summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rndis_wlan.c
AgeCommit message (Collapse)Author
2009-01-21usbnet: allow type check of devdbg arguments in non-debug buildSteve Glendinning
Improve usbnet's devdbg to always type-check diagnostic arguments, like dev_dbg (device.h). This makes no change to the resulting size of usbnet modules. This patch also removes an #ifdef DEBUG directive from rndis_wlan so it's devdbg statements are always type-checked at compile time. Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-12netdevice: safe convert to netdev_priv() #part-4Wang Chen
We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. This patch is a safe convert for netdev->priv to netdev_priv(netdev). Since all of the netdev->priv is only for read. But it is too big to be sent in one mail. I split it to 4 parts and make every part smaller than 100,000 bytes, which is max size allowed by vger. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-10don't use net/ieee80211.hJohannes Berg
Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h. Contains a bugfix in libertas where the SSID parsing could overrun the buffer when the AP sends invalid information. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Dan Williams <dcbw@redhat.com> [airo, libertas] Acked-by: Pavel Roskin <proski@gnu.org> [orinoco] Acked-by: David Kilroy <kilroyd@googlemail.com> [orinoco] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27net: convert print_mac to %pMJohannes Berg
This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-24wireless: Read scan flags correctly on x86-64David Kilroy
The SIOCSIWSCAN handler is passed data in an iw_point structure. Some drivers erronously use an iw_param instead. On 32 bit architectures the difference isn't noticed as the flags parameter tends to be the only one used by scan handlers and is at the same offset. On 64 bit architectures the pointer in the iw_point structure means the flag parameter is at different offsets in these structures. Thanks to Jean Tourrilhes for tracking this down for orinoco, and Pavel Roskin for confirming the fix and identifying other suspect handlers. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-28Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2008-06-28rndis_host: pass buffer length to rndis_commandJussi Kivilinna
Pass buffer length to rndis_command so that rndis_command can read full response buffer from device instead of max CONTROL_BUFFER_SIZE bytes. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-16wext: Emit event stream entries correctly when compat.David S. Miller
Three major portions to this change: 1) Add IW_EV_COMPAT_LCP_LEN, IW_EV_COMPAT_POINT_OFF, and IW_EV_COMPAT_POINT_LEN helper defines. 2) Delete iw_stream_check_add_*(), they are unused. 3) Add iw_request_info argument to iwe_stream_add_*(), and use it to size the event and pointer lengths correctly depending upon whether IW_REQUEST_FLAG_COMPAT is set or not. 4) The mechanical transformations to the drivers and wireless stack bits to get the iw_request_info passed down into the routines modified in #3. Also, explicit references to IW_EV_LCP_LEN are replaced with iwe_stream_lcp_len(info). With a lot of help and bug fixes from Masakazu Mokuno. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-14rndis_wlan: Use kernel-supplied ARRAY_SIZE() macro.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14rndis_wlan: preallocate command buffer for set/get_oidJussi Kivilinna
Reduce amount of kmalloc/kfree calls in set/get_oid by preallocating command buffer. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14rndis_wlan: use kzalloc to allocate private dataJussi Kivilinna
rndis_wlan used kmalloc to allocate private data structure and leaving data uninitialized, but later assumed to be set zero. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14rndis_wlan: cleanup: rename and remove local pointersJussi Kivilinna
Mixed use of 'dev' and 'usbdev' for usbnet pointer can be confusing. So changing all 'usbnet *dev' to 'usbnet *usbdev'. Also remove 'net_device *net' pointer from 'rndis_wext_bind' as 'usbdev->net' were already used where needed. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14rndis_wlan: check if set_multicast_list work is already scheduledJussi Kivilinna
Don't queue set_multicast_list work if WORK_SET_MULTICAST_LIST flag already set. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14rndis_wlan: update carrier flag when link state changesJussi Kivilinna
Driver wasn't updating netif_carrier on link state changes but assumed link layer was always up. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-14rndis_wlan: do link-down state change in worker threadJussi Kivilinna
rndis_wext_link_change() is called from within rndis_command() so it isn't very good place to do any work. Move to worker thread. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-10Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/tg3.c drivers/net/wireless/rt2x00/rt2x00dev.c net/mac80211/ieee80211_i.h
2008-06-03rndis_wlan: use ARRAY_SIZE instead of sizeof when adding 11g ratesScott Ashcroft
While figuring out the TKIP problem I found a bug in the code which adds the 11g rates. It's using sizeof instead of ARRAY_SIZE to terminate the for loop. This makes it fall off the end of the rates array start into the frequency array instead. Running "iwlist rate" should show the problem as there will always be 32 rates with the last few being bogus. The following patch will fix it. Signed-off-by: Scott Ashcroft <scott.ashcroft@talk21.com> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28rndis_wlan: add missing range check for power_output modparamJussi Kivilinna
Range check for power_output were missing. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28rndis_wlan: Make connections to TKIP PSK networks workScott Ashcroft
This patch allows the rndis_wlan driver to connect to TKIP PSK networks. It uses the ASSOCIATION_INFORMATION RNDIS call to pull back the IEs and sends them back to userspace using wireless events. Tested on a few wireless networks I have access to. Based on the similar code in ndiswrapper. Signed-off-by: Scott Ashcroft <scott.ashcroft@talk21.com> [edit: cleanups] Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23wireless: rndis_wlan: modparam_workaround_interval is never below 0.Roel Kluin
priv->param_workaround_interval is unsigned, modparam_workaround_interval not. the former is never < 0. Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13rndis_wlan: cleanup, rename structure membersJussi Kivilinna
Rename members of ndis_80211_* structures to match the style of the rest of the code. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-13rndis_wlan: cleanup, rename and reorder enums and structuresJussi Kivilinna
Rename enums and structures to ndis_80211_* for greater readability. Also change order so that enumerations are presented first. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-04rndis_wlan: fix broken data copyJussi Kivilinna
Replace broken code that attempted to copy 6 byte array to 64-bit integer. Due to missing cast to 64-bit integer, left shift operation were 32-bit and lead to bytes been copied over each other. New code uses simple memcpy, for greater readability and efficiency. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-28rndis_wlan: fix sparse warningsJohannes Berg
It is obviously wrong to use an enum in a little endian struct, and those other enums should be declared differently. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-02-15rndis_wlan: enable stall workaround by link quality instead of link speedJussi Kivilinna
Enable workaround for poor link stalls by link quality instead of link speed. Using link speed caused workaround be active always on 802.11b networks which reduced performance and not even catch all stalls. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-31Add new driver 'rndis_wlan' for wireless RNDIS devices.Jussi Kivilinna
New driver for wireless RNDIS devices. So far only known chip that uses wireless RNDIS is Broadcom 4320. Driver detects all RNDIS devices that have RNDIS wireless physical medium. At least following devices are detected: Buffalo WLI-U2-KG125S U.S. Robotics USR5421 Belkin F5D7051 Linksys WUSB54GSv2 Linksys WUSB54GSC Asus WL169gE Eminent EM4045 BT Voyager 1055 Linksys WUSB54GSv1 U.S. Robotics USR5420 BUFFALO WLI-USB-G54 Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>