History log of /drivers/net/wireless/rndis_wlan.c
Revision Date Author Comments
461bc26c93f27d306a0e74cf642b33eb9d2d4112 29-Feb-2012 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: use u8 for key indexes

cfg80211 uses u8 for key indexes and so should rndis_wlan.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f096ce6d244a380a78e19a7d7a25d9a4a6a6c9b7 29-Feb-2012 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: use RNDIS_WLAN_NUM_KEYS for all key index checks

Use new RNDIS_WLAN_NUM_KEYS for checks in add_wep_key() and add_wpa_key().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f808e4ad05704d4ba0082fbb27640294c6fa4eae 29-Feb-2012 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix le16/le32_to_cpu mix up with config.beacon_period

'beacon_period' in 'struct ndis_80211_conf' is __le32 instead of __le16 so
le32_to_cpu must be used instead of le16_to_cpu.

Also correct 'beacon_interval' variables used for passing this value forward
from u16 to u32 and rename those variables 'beacon_period' This is to avoid
confusion because 'beacon_interval' is defined as __le16 at other structure,
'struct ndis_80211_fixed_ies'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e4e02da2ef01deb36aa80fce6ee0bc3e9725ffe8 29-Feb-2012 Dan Carpenter <dan.carpenter@oracle.com> rndis_wlan: prevent integer overflow in indication()

If we pick a high value for "offset" then it could lead to an integer
overflow and we would get past the check for:
if (offset + len > buflen) { ...

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
551d6fe6cb67ea6f7ca4425a5085b05d34f39730 29-Feb-2012 Dan Carpenter <dan.carpenter@oracle.com> rndis_wlan: make some variables unsigned

These variables can never be less than zero because we cap them in
get_device_pmkids(). Let's make them unsigned here because it's simpler
to not have to worry about negative numbers when we read the code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b26e395038a219685c7f78f3be8aeb578c4a5b60 29-Feb-2012 Dan Carpenter <dan.carpenter@oracle.com> rndis_wlan: remove unneeded variables

We never use the "len" variable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
41eedf39dfb145fb8fa04cd5b799f7bdc7679696 01-Mar-2012 Dan Carpenter <dan.carpenter@oracle.com> rndis_wlan: integer overflows in rndis_wlan_do_link_up_work()

If "offset" is negative then we can get past this check:
if (offset > CONTROL_BUFFER_SIZE)
Or if we pick a very high "req_ie_len" then we can get around the check:
if (offset + req_ie_len > CONTROL_BUFFER_SIZE)

I made "resp_ie_len" and "req_ie_len" unsigned. I don't know if it was
intentional that they were signed in the original.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a7cf534d4ddc961bf74f54a964ad0fd19b389b6e 19-Nov-2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: remove unused macro

NET_TYPE_11FB actually has never been used.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1c70687536575bcc96ae88b69154ca62dbdac7c1 19-Nov-2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add reporting of PMKSA candidate events

Convert old WEXT reporting to use new cfg80211_pmksa_candidate_notify().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
30fd90731d45eab2f4f51e622e522075c90a0d59 19-Nov-2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add missing __packed

Some structures were missing __packed.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6f104a081b18ffc7c666be2a1cda682f83d7c8b7 19-Nov-2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: pass channel info to cfg80211_roamed()

cfg80211_roamed() now has channel parameter so add passing current channel
info.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cb82a66d0f35eb3f510c3f770d6fbdc3b17ab041 19-Nov-2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: split getting current channel to separate function

Split getting current channel channel from hardware to separate function
as this function will be needed later in patch 'pass channel info to
cfg80211_roamed()'.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d632eb1bf22e11def74e4e53cc47d790fbdba105 18-Nov-2011 Greg Kroah-Hartman <gregkh@suse.de> USB: convert drivers/net/* to use module_usb_driver()

This converts the drivers in drivers/net/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Petko Manolov <petkan@users.sourceforge.net>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: Herton Ronaldo Krzesinski <herton@canonical.com>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Roel Kluin <roel.kluin@gmail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Jiri Pirko <jpirko@redhat.com>
Cc: Pavel Roskin <proski@gnu.org>
Cc: Yoann DI-RUZZA <y.diruzza@lim.eu>
Cc: George <george0505@realtek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
a64e2e2354679ad1742b4c43ac665ffa075ef8a0 28-Oct-2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: release BSS structures returned by cfg80211_inform_bss()

Patch fixes rndis_wlan to release referenced BSS structure returned by
cfg80211_inform_bss().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ec3cbb9ce241da90b9d43e49996fae5082c6b6f7 18-Oct-2011 Dan Carpenter <dan.carpenter@oracle.com> rndis_wlan: add range check in del_key()

Wifi drivers can have up to 6 keys but the rndis_wlan only has 4 so
it needs to have its own checks to make sure we don't go out of
bounds. The add_key() function already checks but I added some
checks to del_key() and set_default_key().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
afc4b13df143122f99a0eb10bfefb216c2806de0 16-Aug-2011 Jiri Pirko <jpirko@redhat.com> net: remove use of ndo_set_multicast_list in drivers

replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
029111e1c62f4f5ceb2a478ebb82bae9f882646a 13-Jul-2011 Johannes Berg <johannes.berg@intel.com> rndis_wlan: remove wireless extensions inclusions

linux/wireless.h and net/iw_handler.h headers are
for wireless extensions only, so mac80211 drivers
shouldn't be including them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ed9d01026f156db2d638cbb045231c7a8fde877d 16-May-2011 Jouni Malinen <jouni.malinen@atheros.com> cfg80211: Use consistent BSS matching between scan and sme

cfg80211 scan code adds separate BSS entries if the same BSS shows up
on multiple channels. However, sme implementation does not use the
frequency when fetching the BSS entry. Fix this by adding channel
information to cfg80211_roamed() and include it in cfg80211_get_bss()
calls.

Please note that drivers using cfg80211_roamed() need to be modified to
fully implement this fix. This commit includes only minimal changes to
avoid compilation issues; it maintains the old (broken) behavior for
most drivers. ath6kl was the only one that I could test, so I updated
it to provide the operating frequency in the roamed event.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
63453c05da685323d45b7063cc27cf5e44b4134c 23-Feb-2011 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: use power save only for BCM4320b

BCM4320a breaks when enabling power save (bug 29732). So disable power save
for anything but BCM4320b that is known to work.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
40d70dd12200ffeacfe9caaa8242e3ad2995bb5d 21-Dec-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add support for set_power_mgmt

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
49b35bd3f5bbc6997b24b04e9d4896f00cee3528 21-Dec-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add support for set_cqm_rssi_config

Device poller already reads current RSSI, so add support for
set_cqm_rssi_config there.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a3463a1fdc9aa0881760e54efbd62742275601a5 21-Dec-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: remove unused variable from priv structure

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c2aa413279cde7c867fc90b07f83fff3c1e9e98d 21-Dec-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: constify rndis_config_ops

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
21b27beca73ad7d2829fe9cc3e48054f69e3d9d3 21-Dec-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: turn radio off before interface is bring up

Radio should be off when interface is down.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0b578021745b61b2ff89f6bacbac5db08a9a8089 21-Dec-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: do not set default_key if not WEP key

rndis_set_default_key did call add_wep_key to set default key on device, even
if key is WPA. This caused rndis_wlan not work with wpa_supplicant in nl80211
mode (causing disconnect from AP).

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
bfe3850b0cfca6ba64395e2705d9a51cd044f374 21-Dec-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: scanning, workaround device returning incorrect bssid-list item count.

Sometimes device returns wrong number of items in bssid-list. Appears that
some specific beacons trigger this problem and leads to very poor scanning
results. Workaround by ignoring num_items received from device and walkthrough
full bssid-list buffer.

v2: Fix buffer range checks and reading next item length. Old code read
behind buffer on last item but didn't use those values as 'count' would
also reach zero. Also fix resizing of buffer if device has larger buffer,
old code assumed that BSSID-list OID would return same buffer size
when it really can return yet another new larger length.

Tested-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
dbd2fd656f2060abfd3a16257f8b51ec60f6d2ed 09-Dec-2010 Johannes Berg <johannes.berg@intel.com> cfg80211/nl80211: separate unicast/multicast default TX keys

Allow userspace to specify that a given key
is default only for unicast and/or multicast
transmissions. Only WEP keys are for both,
WPA/RSN keys set here are GTKs for multicast
only. For more future flexibility, allow to
specify all combiations.

Wireless extensions can only set both so use
nl80211; WEP keys (connect keys) must be set
as default for both (but 802.1X WEP is still
possible).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
22288a5847df30fb8ba298914f144c3b1d6e1fbe 21-Nov-2010 Joe Perches <joe@perches.com> rndis_wlan: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

text data bss dec hex filename
41757 2205 9896 53858 d262 drivers/net/wireless/rndis_wlan.o.old
41653 2205 9880 53738 d1ea drivers/net/wireless/rndis_wlan.o.new

Changed functions rndis_set_oid and set_bssid to take const *'s.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
458fafdd579dcb58c8288c55c9cd92d6816ba094 16-Nov-2010 John W. Linville <linville@tuxdriver.com> rndis_wlan: avoid uninitialized var warning in rndis_wlan_craft_connected_bss

CC [M] drivers/net/wireless/rndis_wlan.o
drivers/net/wireless/rndis_wlan.c: In function ‘rndis_wlan_craft_connected_bss’:
drivers/net/wireless/rndis_wlan.c:2542:2: warning: ‘ret’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
5cb56af29be8d12f74afcb2c1de91e51a577bd52 09-Nov-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: workaround poor scanning with BCM4320a

BCM4320a devices seem to sometimes do scanning pretty poorly. This can be
workaround by issuing new scan every second, while not yet connected. By this
new scanning method device catches beacons much faster. Fixes bug #20822.

Reported-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b5257c952dda24df7078c74b7b811b44c6e49206 09-Nov-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: workaround device not returning bss for currently connected AP

BCM4320a devices do not return bss for currently connected AP in bss-list,
althought this is required by NDIS specs. Missing bss leads to warning at
net/wireless/sme.c:__cfg80211_connect_result(), WARN_ON(!bss).

Workaround this by crafting bss manually with information we can read from
device. Workaround is only used when device bss-list does not return current
bss, and so is only used with BCM4320a devices and not newer BCM4320b ones.

Fixes bug #20152.

Reported-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e31b82136d1adc7a599b6e99d3321e5831841f5a 05-Oct-2010 Johannes Berg <johannes.berg@intel.com> cfg80211/mac80211: allow per-station GTKs

This adds API to allow adding per-station GTKs,
updates mac80211 to support it, and also allows
drivers to remove a key from hwaccel again when
this may be necessary due to multiple GTKs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fa61cf70a6ae1089e459e4b59b2e8d8e90d8535e 22-Jun-2010 Juuso Oikarinen <juuso.oikarinen@nokia.com> cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm units

In preparation for a TX power setting interface in the nl80211, change the
.set_tx_power function to use mBm units instead of dBm for greater accuracy and
smaller power levels.

Also, already in advance move the tx_power_setting enumeration to nl80211.

This change affects the .tx_set_power function prototype. As a result, the
corresponding changes are needed to modules using it. These are mac80211,
iwmc3200wifi and rndis_wlan.

Cc: Samuel Ortiz <samuel.ortiz@intel.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ba2d3587912f82d1ab4367975b1df460db60fb1e 02-Jun-2010 Eric Dumazet <eric.dumazet@gmail.com> drivers/net: use __packed annotation

cleanup patch.

Use new __packed annotation in drivers/net/

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3d1ca47eba76a31ad134e5c4d841234f5a6a92c3 18-May-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: increase assocbuf size and validate association info offsets from driver

Buffer size for get_association_info was limited to WEXT event size. Since association
info no longer is sent through WEXT, this limit is not needed. Code also did not
check if data get truncated, memory outside buffer might be addressed. Fix all these.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b6411fc23c70d7a9f57a0bfb35212ad92b5c2b5e 18-May-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: replace wireless_send_event with cfg80211_disconnected

Remove (hopefully) last use of WEXT in rndis_wlan. Replace wireless_send_event
with missing cfg80211_disconnected in rndis_wlan_do_link_down_work.

Reported-by: "Rogério Brito" <rbrito@ime.usp.br>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f444de05d20e27cdd960c13fcbcfca3099f03143 05-May-2010 Johannes Berg <johannes@sipsolutions.net> cfg80211/mac80211: better channel handling

Currently (all tested with hwsim) you can do stupid
things like setting up an AP on a certain channel,
then adding another virtual interface and making
that associate on another channel -- this will make
the beaconing to move channel but obviously without
the necessary IEs data update.

In order to improve this situation, first make the
configuration APIs (cfg80211 and nl80211) aware of
multi-channel operation -- we'll eventually need
that in the future anyway. There's one userland API
change and one API addition. The API change is that
now SET_WIPHY must be called with virtual interface
index rather than only wiphy index in order to take
effect for that interface -- luckily all current
users (hostapd) do that. For monitor interfaces, the
old setting is preserved, but monitors are always
slaved to other devices anyway so no guarantees.

The second userland API change is the introduction
of a per virtual interface SET_CHANNEL command, that
hostapd should use going forward to make it easier
to understand what's going on (it can automatically
detect a kernel with this command).

Other than mac80211, no existing cfg80211 drivers
are affected by this change because they only allow
a single virtual interface.

mac80211, however, now needs to be aware that the
channel settings are per interface now, and needs
to disallow (for now) real multi-channel operation,
which is another important part of this patch.

One of the immediate benefits is that you can now
start hostapd to operate on a hardware that already
has a connection on another virtual interface, as
long as you specify the same channel.

Note that two things are left unhandled (this is an
improvement -- not a complete fix):

* different HT/no-HT modes

currently you could start an HT AP and then
connect to a non-HT network on the same channel
which would configure the hardware for no HT;
that can be fixed fairly easily

* CSA

An AP we're connected to on a virtual interface
might indicate switching channels, and in that
case we would follow it, regardless of how many
other interfaces are operating; this requires
more effort to fix but is pretty rare after all

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
22bedad3ce112d5ca1eaf043d4990fa2ed698c87 01-Apr-2010 Jiri Pirko <jpirko@redhat.com> net: convert multicast list to list_head

Converts the list and the core manipulating with it to be the same as uc_list.

+uses two functions for adding/removing mc address (normal and "global"
variant) instead of a function parameter.
+removes dev_mcast.c completely.
+exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
manipulation with lists on a sandbox (used in bonding and 80211 drivers)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
5a7d05830de1ecfdaf0a9fb43e4aa08abbdbfe9f 04-Mar-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: Implement cfg80211 PMKSA API

Add support for cfg80211 set_pmksa/del_pmksa/flush_pmksa. Updating PMKID
entry list is done on driver side since NDIS API requires full list update.

v2:
- fixed to use new netdev_dbg/warn/etc instead of old devdbg/warn/etc
- fixed false padding from struct ndis_80211_bssid_info

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0308383f9591c991b3eb865c4f5ea2a87242afac 04-Mar-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: get max_num_pmkids from device

Extend rndis_wlan_get_caps() to get 802.11 capabilities and maximum
supported number of PMKIDs by device.

v2: fixed to use new netdev_dbg/warn/etc instead of old devdbg/warn/etc

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ea29d65ea4e7585a5ac94f7ec0069d384315bd77 04-Mar-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: remove unused variables from priv structure

Some variables were left unused after cfg80211 conversion. Remove those and related deadcode.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
80f8c5b434f94926c6489d7350d58aecb53ab70f 04-Mar-2010 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: copy only useful data from rndis_command respond

rndis_query_oid() uses full output buffer size to copy response buffer
from rndis_command()/device. This doesn't cause problems as response buffer
is sized based on output buffer but does copy extra unset bytes.
So change rndis_query_oid() so that only meaningful bytes are being copied.

Also in case of malfunctioning device/cable/etc returned data offset from
device might be wrong so bound check memory access correctly, so add
checks for this.

v2: fixed to use new netdev_dbg/warn/etc instead of old devdbg/warn/etc

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12c3400a84742f8bb0e4edc822e9ccba58781e0c 04-Mar-2010 Jiri Pirko <jpirko@redhat.com> rndis_wlan: correct multicast_list handling V3

My previous patch (655ffee284dfcf9a24ac0343f3e5ee6db85b85c5) added locking in
a bad way. Because rndis_set_oid can sleep, there is need to prepare multicast
addresses into local buffer under netif_addr_lock first, then call
rndis_set_oid outside. This caused reorganizing of the whole function.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reported-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
655ffee284dfcf9a24ac0343f3e5ee6db85b85c5 27-Feb-2010 Jiri Pirko <jpirko@redhat.com> wireless: convert to use netdev_for_each_mc_addr

also added missed locking in rndis_wlan.c

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
60b86755929e1a7e9038c8d860a8491cfdf8d93a 17-Feb-2010 Joe Perches <joe@perches.com> usbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>

These macros are too similar to the dev_<level> equivalents
but take a usbnet * argument. Convert them to the recently
introduced netdev_<level> macros and remove the old macros.

The old macros had "\n" appended to the format string.
Add the "\n" to the converted uses.

Some existing uses of the dev<foo> macros in cdc_eem.c
probably mistakenly had trailing "\n". No "\n" added there.

Fix net1080 this/other log message inversion.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 08-Feb-2010 Jiri Pirko <jpirko@redhat.com> net: use netdev_mc_count and netdev_mc_empty when appropriate

This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.

Jirka

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6e850af58f93be8f1b4b79eb9c79d06788f38e78 30-Nov-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: copy module parameters for bcm4320a devices too

rndis_wlan didn't copy module parameters for bcm4320a to private structure.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cef6e91280b724e93b0fb8a9fd3e6bf072f54c81 30-Nov-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: move copy of module parameters to separate function

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
77593ae28c4c134eaf28ef34ecac3cd4464ecd6e 22-Nov-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: disable stall workaround

Stall workaround doesn't work with bcm4320a devices like with bcm4320b.
This workaround actually causes more stalls/device freeze on bcm4320a.
Therefore disable stall workaround by default.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c1f8ca1d837148bf061d6ffa2038366e3cf0e4d7 22-Nov-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix buffer overflow in rndis_query_oid

rndis_query_oid overwrites *len which stores buffer size to return full size
of received command and then uses *len with memcpy to fill buffer with
command.

Ofcourse memcpy should be done before replacing buffer size.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
634a555ce3ee5ea1fdcaee8b4ac9ce7b54f301ac 15-Nov-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: handle NL80211_AUTHTYPE_AUTOMATIC

rndis_wlan didn't know about NL80211_AUTHTYPE_AUTOMATIC and simple
setup with 'iwconfig wlan essid no-encrypt' would fail (ENOSUPP).

v2: use NDIS_80211_AUTH_AUTO_SWITCH instead of _OPEN.
This will make device try shared key auth first, then open.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
53d27eaf55fb5a6e820d8e3759588473826d659e 01-Sep-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix sparse endianess warnings

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c5c4fe90e399e4c1265414249c33429c19a16ea8 01-Sep-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: cleanup

- remove double newlines between functions
- remove commented out function (rndis_set_config_parameter_u32())
- coding style fix in rndis_set_config_parameter_str()
- add comment banners between function sections

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
051ae0bf7ff67c0a64485ac3b46a29aeb55a28dc 01-Sep-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: use bool for on/off switches

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
04a6445f6f5e439ef775bd18cf3f485f84bbfb1b 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: use cfg80211_wext_handler

Now that cfg80211 functions are added and wext converted to use wext-compat
functions, remove wext structures and disabled code.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
21ec2d8d0fee4f3bf0d2e25e5b63bf2637233b43 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: disable IWEVPMKIDCAND wireless event

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a0f9ce2ac35a0c57413dafd90e316c4048d1b43e 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: convert mic failure wireless event to cfg80211

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3334943cefa03a5384060e321e3dd9e686097caf 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: remove unneeded SIOCSIWCOMMIT

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
305e243e6868eb6cf898183a523455bb9264cd2c 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: rename wireless stats worker to device poller

Stats worker no longer poll stats from device anymore. It's still
needed to poll device control channel for connect/disconnect events,
so rename stats worker as device poller.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d695df9049199bdeadd81c29104da8e2542062cf 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add cfg80211 dump_station

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8b89a2883be4b6bad8ac0c5928784febb2b34172 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add cfg80211 get_station

Add cfg80211 get_station and convert SIOCGIWRATE and get_wireless_stats
to cfg80211.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
84bf8400cee127be3b58a9d9b8cfa453dad999ab 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add cfg80211 key handling

Add cfg80211 add_key/del_key/set_default_key and convert wext to use theim.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5554adbe0d366f6a5096e6f74b48dcad5698c528 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add cfg80211 set_channel

Add cfg80211 set_channel and convert wext to use it.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5c52323e8c44a06183052986dbd028ce15622166 28-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add cfg80211 connect, disconnect, join_ibss and leave_ibss

Add cfg80211 connect functions for station and ad-hoc modes and
convert wext to use theim.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9f77ccab57534f45b0289ceae3a6b85478d14182 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: enable infrastructure before setting random essid

Random essid must be set to turn on radio when not connected. If device is
in ad-hoc mode, this results 'media connect' indications with the random
essid which should be ignored.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
161391725eba1f07e98594369cfcb10c848ef352 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: set ieee80211_ptr->iftype in rndis_change_virtual_intf

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7b1fff996a5408261ca458f82369d1f5b7aad2d4 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: use is_zero_ether_addr() and is_broadcast_ether_addr()

Use is_zero_ether_addr() and is_broadcast_ether_addr() instead of
memcmp against ffff_bssid/zero_bssid.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0848e6c698237ba51c69eca10580d2f38a1179ad 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: move link up/down work to separate functions

Move link up/down work to separate functions and use local array
for allocating memory for info structure instead of kzmalloc.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b1d25a67647efacf2a9f2a1800f0c8195827f923 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: increase scan timer delay

Increase scan delay from 1 sec to 6 sec. Spec says that scan by
OID_802_11_BSSID_LIST_SCAN completes in 6 seconds.
Before rfkill patch too short delay was not problem as device was
always active (radio on) and performing background scanning.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5fd8f2503b0888ed0c8e0017264059a3f9dc51c0 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: resize bssid list if too small

Buffer used for bssid list might be too small. Change rndis_query_oid()
to return required buffer length to caller and make rndis_check_bssid_list()
resize buffer when needed.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
db0dd396da45502e02c64c4153c5822ab5a59a5f 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: get bssid scan list before new scan

OID_802_11_BSSID_LIST_SCAN clears device's bssid list, so retrieve
current bssid list from device before issuing new scan.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5f81ff5a7a12a9281d03be103382971ce490268e 27-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: ignore OID_802_11_ADD_KEY triggered media connect indications

Setting WPA keys with OID_802_11_ADD_KEY sometimes trigger
instant media connect indication. These indications are extranous and
should be ignored, as otherwise driver would send reassociation event to
userspace which in this case is not needed.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4a7f13eef508012bd1b0ffbb24b807e3494f31cd 26-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: set cipher suites for cfg80211

rndis_wlan does not set cipher suites list for cfg80211 which causes
wext-compat-range to report rndis_wlan not supporting WPA. Patch adds
cipher suites list and fixes NetworkManager not being able to connect to
WPA encrypted APs.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
40ba60ddfeff8ef42fb33c0bdacfbb5f83e96b32 20-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix broken logic in add_wep_key()

add_wep_key() tries to check if key length is not 5 AND not 13
but uses (key_len != 5 || key_len != 13) instead. Fix this.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7834ddbcc7a097443761b0722e8c9fb8511b95b1 11-Aug-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> usbnet: add rx queue pausing

Add rx queue pausing to usbnet. This is needed by rndis_wlan so that it can
control rx queue and prevent received packets from being send forward before
rndis_wlan receives and handles 'media connect'-indication. Without this
establishing WPA connections is hard and fail often.

[v2] - removed unneeded use of skb_clone

Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b7cfc5b35eed2fe8a5c45793e6e52ef0edddc824 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: rework key handling

Organize key data in private structure better and store WPA keys, so
they can be restored as WEP keys.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9d40934e5e28314731d4b32acd2fdf5fb805a3ed 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add missing padding to struct rndis_80211_remove_key

OID_802_11_REMOVE_KEY failed with invalid length error, add missing padding to
structure fix this.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
030645aceb3d9f10b1c3d2231c50f5a8bb3a9667 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: handle 802.11 indications from device

Add handling for 802.11 specific rndis indications.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2a4901bcbe9c122bd56e1f6c337fcb4ad75fafb7 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_host: allow rndis_wlan to see all indications

Allow rndis_wlan to see all indications. Currently rndis_host lets rndis_wlan to
know about link state changes only, but there is whole set of other
802.11-specific indications that rndis_wlan should handle properly. So rename
link_change() to indication() and convert rndis_wlan to use it.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
27b7b5c131a1df6701a96e10d1056de8e3b15aa9 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add rndis_set/query_oid debugging

Add better debugging for failed OID queries.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e5a11a822e1758b05b987e3a5041ef1029aa6cec 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: set current packet filter to zero on stop

Set current packet filter to zero to block receiving data packets from
device.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7eaab7086c3a313d76c217f98bc610c523d9bc2c 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: reset device and restore multicast list on rndis_wlan_reset()

Reset device properly with RNDIS_MSG_RESET in rndis_wlan_reset() and restore
multicast list afterwards.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
005ba2f17e68b4da6a2c2c01c826294beac50415 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: clear cfg80211 scan on rndis_wlan_stop()

Scanning gets stuck if device is stopped when scan is active. Fix by
clearing/aborting cfg80211 scan on rndis_wlan_stop().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
110736de938b5bfdd63c86166e355d3f16115f6a 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: stop workers on rndis_wlan_stop() and restore on rndis_wlan_reset()

Driver doesn't need to poll statistics/link status when stopped.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1487cd5e76337555737cbc55d7d83f41460d198f 30-Jul-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> usbnet: allow "minidriver" to prevent urb unlinking on usbnet_stop

rndis_wlan devices freeze after running usbnet_stop several times. It appears
that firmware freezes in state where it does not respond to any RNDIS commands
and device have to be physically unplugged/replugged. This patch lets
minidrivers to disable unlink_urbs on usbnet_stop through new info flag.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
222ec50a0a5d20e75522aacf4c767df6585e8548 16-Jun-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: convert set/get txpower to cfg80211

Convert set/get txpower to cfg80211 and add stop netdev handler to turn off
radio for rfkill.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d75ec2b7ec27fd6cdba78492fbd63bee4d091a87 16-Jun-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: convert get/set frag/rts to cfg80211

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e36d56b64808aec54b68b4e9976180c1da0933b2 09-Jun-2009 Johannes Berg <johannes@sipsolutions.net> cfg80211: pass netdev to change_virtual_intf

If there was a reason I'm passing the ifidx I cannot
remember it any more and don't see one now, so let's
just pass the pointer itself.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6d60f9dfc8d437e914d46fa355c50c695cad24e7 07-Apr-2009 Martin Olsson <mnemo@minimum.se> trivial: Fix paramater/parameter typo in dmesg and source comments

Signed-off-by: Martin Olsson <martin@minimum.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
582241a08409c89b086774c60b55c1a1706a7e5d 04-Jun-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: cleanup: rename all rndis_wext* objects to rndis_wlan*

Driver used to be named rndis_wext before inclusion to upstream. Since
rndis_wlan is being converted to cfg80211, use of rndis_wext* names
can be confusing. So rename all rndis_wext to rndis_wlan (as should
have been when driver was renamed).

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
aa18294a289548f45ea6a784f008295ccddf6b14 04-Jun-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: cleanup: capitalize enum labels

Capitalize enum labels as told in Documents/CodingStyle.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9839178e92bf205728c754aeb1933f631a9962d9 22-May-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: do not try to restore wpa keys using add_wep_key()

set_infra_mode() tried to restore wpa keys using add_wep_key(). This never
worked so prevent driver from trying.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b145ee0ce1e325497e5bb91f78f1545b552b518f 22-May-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: split add_wpa_key from rndis_iw_set_encode_ext

Split add_wpa_key() from rndis_iw_set_encode_ext so that conversion to cfg80211
would be easier later on.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b4703a2e32fdffbf83caf699817b21c4fc6d987c 22-May-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: explain bits used in key setup code.

Driver uses some unnamed bits to control encryption setup. Move these to
enumerations with proper names explaining their meaning.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9656e85ba24a9814f1705e0e3639281d15d6a419 22-May-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: remove CAP_SUPPORT_TXPOWER/OID_802_11_TX_POWER_LEVEL code

BCM4320 doesn't support OID_802_11_TX_POWER_LEVEL (chip implements
the command but setting value has no effect and getting txpower value
always returns 0xff, full power). So remove the code for cleanup.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
59620e9fd631703ecdc7a6d304231b45560b8d26 22-May-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix support for bcm4320a

Old variant of bcm4320 doesn't handle setting configuration parameters
correctly. One symptom is that MAC gets partially overwritten when any
config parameters are set. This patch disables config-params for bcm4320a
(and generic rndis-wlan).

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e805e4d0b53506dff4255a2792483f094e7fcd2c 22-Apr-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix initialization order for workqueue&workers

rndis_wext_link_change() might be called from rndis_command() at
initialization stage and priv->workqueue/priv->work have not been
initialized yet. This causes invalid opcode at rndis_wext_bind on
some brands of bcm4320.

Fix by initializing workqueue/workers in rndis_wext_bind() before
rndis_command is used.

This bug has existed since 2.6.25, reported at:
http://bugzilla.kernel.org/show_bug.cgi?id=12794

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
eb1a685e07310b5137c561e25ab738292db2c8a5 21-Apr-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: free priv correctly when rndis_wext_bind fails

Private structure is allocated by wiphy_new now, so use
wiphy_free instead of kfree.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8d4d99ae89a8845a1d63b0529dd98da28dc0ff65 21-Apr-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix initialization order for workqueue&workers

rndis_wext_link_change() might be called from rndis_command() at
initialization stage and priv->workqueue/priv->work have not been
initialized yet. This causes invalid opcode at rndis_wext_bind on
some brands of bcm4320.

Fix by initializing workqueue/workers in rndis_wext_bind() before
rndis_command is used.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
caa6dfadebee2098e9c5ece1d5efae96a6926d0f 21-Apr-2009 Johannes Berg <johannes@sipsolutions.net> rndis_wlan: make some symbols static

sparse complains, correctly, about these:

drivers/net/wireless/rndis_wlan.c:418:21: warning: symbol 'rndis_config_ops' was not declared. Should it be static?
drivers/net/wireless/rndis_wlan.c:423:6: warning: symbol 'rndis_wiphy_privid' was not declared. Should it be static?

Fix that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
314bd7503b1e96841931311f28a8925dab66ed83 20-Apr-2009 Johannes Berg <johannes@sipsolutions.net> rndis_wlan: remove nickname support

Supporting wireless extension nickname is pointless
and no other modern driver supports this, so remove
it.

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>
d323655372590c533c275b1d798f9d1221efb5c6 20-Apr-2009 Johannes Berg <johannes@sipsolutions.net> cfg80211: clean up includes

Trying to separate header files into net/wireless.h and
net/cfg80211.h has been a source of confusion. Remove
net/wireless.h (because there also is the linux/wireless.h)
and subsume everything into net/cfg80211.h -- except the
definitions for regulatory structures which get moved to
a new header net/regulatory.h.

The "new" net/cfg80211.h is now divided into sections.

There are no real changes in this patch but code shuffling
and some very minor documentation fixes.

I have also, to make things reflect reality, put in a
copyright line for Luis to net/regulatory.h since that
is probably exclusively written by him but was formerly
in a file that only had my copyright line.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
71a7b26d3e6404e43574f80236c00eaa39b2525e 26-Mar-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: convert scan to cfg80211

Convert scan function to cfg80211. Unlike old scan code new code
waits 1 sec before getting scan data from device and passing
forward to cfg80211.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4d2a369ec09167f423c0783b1cf85cee8102544f 26-Mar-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: convert get range to cfg80211

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4bd7f03e915b6946307ce57f20718c6547734b5d 26-Mar-2009 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: change quality level scale

Change quality level scale to match cfg80211 CFG80211_SIGNAL_TYPE_UNSPEC.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
964c1d417e4738d359ba263921a7b9c18fa711c4 26-Mar-2009 John W. Linville <linville@tuxdriver.com> rndis_wlan: convert get/set mode to cfg80211

Signed-off-by: John W. Linville <linville@tuxdriver.com>
[edit: made rndis_change_virtual_intf static]
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5c8fa4f7e7fcceabb3b37d7ec66d3e7115a4bba3 26-Mar-2009 John W. Linville <linville@tuxdriver.com> rndis_wlan: initiate cfg80211 conversion

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
23d12e2bdd4f73d90c8c29674c531aa45eecf27f 25-Mar-2009 David S. Miller <davem@davemloft.net> rndis_wlan: Fix build with netdev_ops compat disabled.

Instead of storing a private ->set_multicast_list, just
have a private netdev ops.

Signed-off-by: David S. Miller <davem@davemloft.net>
35c26c2cf6a6a2d1c48add732d8ba002bd90784c 15-Feb-2009 Harvey Harrison <harvey.harrison@gmail.com> rndis: remove private wrapper of __constant_cpu_to_le32

Use cpu_to_le32 directly as it handles constant folding now, replace direct
uses of __constant_cpu_to_{endian} as well.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
9ee677c2276bfcbcf68042ec2718a504af0c5fd7 23-Dec-2008 David Kilroy <kilroyd@googlemail.com> wireless: Add channel/frequency conversions to ieee80211.h

Added mappings for FHSS, DSSS and OFDM channels - with macros to point
HR DSSS and ERP to the DSSS mappings. Currently just static inline
functions.

Use the new functions in the older fullmac drivers. This eliminates a
number of const static buffers and removes a couple of range checks that
are now redundant.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Richard Farina <sidhayn@gmail.com>
Acked-by: Jeroen Vreeken <pe1rxq@amsat.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0b491eee46012772cbf029450d123e933c2e7940 21-Jan-2009 Steve Glendinning <steve.glendinning@smsc.com> usbnet: allow type check of devdbg arguments in non-debug build

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>
524ad0a79126efabf58d0a49eace6155ab5b4549 13-Nov-2008 Wang Chen <wangchen@cn.fujitsu.com> netdevice: safe convert to netdev_priv() #part-4

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>
2c706002fc147decdba2658ea48e4436faca3af2 30-Oct-2008 Johannes Berg <johannes@sipsolutions.net> don't use net/ieee80211.h

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>
e174961ca1a0b28f7abf0be47973ad57cb74e5f0 27-Oct-2008 Johannes Berg <johannes@sipsolutions.net> net: convert print_mac to %pM

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>
9930ccee16addda9fa7d9af00cd03cd5a10c8965 13-Sep-2008 David Kilroy <kilroyd@googlemail.com> wireless: Read scan flags correctly on x86-64

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>
818727badc14ce57dc099a075b05505d50b7956e 18-Jun-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_host: pass buffer length to rndis_command

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>
ccc580571cf0799d0460a085a7632b77753f083e 17-Jun-2008 David S. Miller <davem@davemloft.net> wext: Emit event stream entries correctly when compat.

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>
5720508d9ad9a82927875252b7a19ba2b45f11f8 12-Jun-2008 Robert P. J. Day <rpjday@crashcourse.ca> rndis_wlan: Use kernel-supplied ARRAY_SIZE() macro.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
90d07349f8d754b89de8c61bdef9f95688900f30 12-Jun-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: preallocate command buffer for set/get_oid

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>
bb8649d42989eddf9c7d128114c1adcffe9eef54 12-Jun-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: use kzalloc to allocate private data

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>
a19d7292dc7f1c7d8704a353f51c7f1529de953b 02-Jun-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: cleanup: rename and remove local pointers

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>
a67edb9e31a328397516d2285269232e98c5f88b 02-Jun-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: check if set_multicast_list work is already scheduled

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>
5331b96ce3a9f08d3a9e28386e193e8c78f8fdd1 02-Jun-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: update carrier flag when link state changes

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>
6010ce07a66cfed043879de31275f5b90b33c4fc 02-Jun-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: do link-down state change in worker thread

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>
20ad4fd56255b455beb677dc097eb108d15f1d63 27-May-2008 Scott Ashcroft <scott.ashcroft@talk21.com> rndis_wlan: use ARRAY_SIZE instead of sizeof when adding 11g rates

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>
a7624837261b55259d4a88309fd88529643fbb80 27-May-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: add missing range check for power_output modparam

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>
4364623cb79d02945ace7a4faa1f11e617dde198 26-May-2008 Scott Ashcroft <scott.ashcroft@talk21.com> rndis_wlan: Make connections to TKIP PSK networks work

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>
4d381ffb02701c3fc976091473aead7c03523133 23-Apr-2008 Roel Kluin <12o3l@tiscali.nl> wireless: rndis_wlan: modparam_workaround_interval is never below 0.

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>
461b3f2aa3c45eb2e85751b6a3b75a8dd1abd04a 08-Mar-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: cleanup, rename structure members

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>
1e41e1d2771456274ae2c748ed2cc74524a5863f 08-Mar-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: cleanup, rename and reorder enums and structures

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>
cdb2a9fe63575dd1eb82b724bbd0aa5e0dd89fa0 04-Mar-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: fix broken data copy

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>
5b0acc64a3750f8f017b973f1059bb25b791c2a3 20-Feb-2008 Johannes Berg <johannes@sipsolutions.net> rndis_wlan: fix sparse warnings

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>
a97b1f3d203d0fe5503578c6ee8bfdb89ed72679 06-Feb-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> rndis_wlan: enable stall workaround by link quality instead of link speed

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>
bf164cc054d568fa7889ffab41d3b091f5758c75 25-Jan-2008 Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Add new driver 'rndis_wlan' for wireless RNDIS devices.

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>