Johannes Berg [Thu, 2 Jul 2009 07:58:04 +0000 (09:58 +0200)]
cfg80211: send events for userspace SME
When the userspace SME is in control, we are currently not sending
events, but this means that any userspace applications using wext
or nl80211 to receive events will not know what's going on unless
they can also interpret the nl80211 assoc event. Since we have all
the required code, let the SME follow events from the userspace
SME, this even means that you will be refused to connect() while
the userspace SME is in control and connected.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:41:17 +0000 (21:41 +0200)]
mac80211: remove dead code, clean up
With mac80211 now always controlled by an external SME,
a lot of code is dead -- SSID, BSSID, channel selection
is always done externally, etc. Additionally, rename
IEEE80211_STA_TKIP_WEP_USED to IEEE80211_STA_DISABLE_11N
and clean up the code a bit.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:40:45 +0000 (21:40 +0200)]
mac80211: remove auth algorithm retry
The automatic auth algorithm issue is now solved in
cfg80211, so mac80211 no longer needs code to try
different algorithms -- just using whatever cfg80211
asked for is good.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:27:01 +0000 (21:27 +0200)]
mac80211: re-add HT disabling
The IEEE80211_STA_TKIP_WEP_USED flag is used internally to
disable HT when WEP or TKIP are used. Now that cfg80211 is
giving us the required information, we can set the flag
appropriately again.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:27:00 +0000 (21:27 +0200)]
cfg80211: implement get_wireless_stats
By dropping the noise reporting, we can implement
wireless stats in cfg80211. We also make the
handler return NULL if we have no information,
which is possible thanks to the recent wext change.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:59 +0000 (21:26 +0200)]
cfg80211: implement IWRATE
For now, let's implement that using a very hackish way:
simply mirror the wext API in the cfg80211 API. This
will have to be changed later when we implement proper
bitrate API.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:58 +0000 (21:26 +0200)]
cfg80211: implement IWAP for WDS
This implements siocsiwap/giwap for WDS mode.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:57 +0000 (21:26 +0200)]
cfg80211: implement iwpower
Just on/off and timeout, and with a hacky cfg80211 method
until we figure out what we want, though this is probably
sufficient as we want to use pm_qos for wifi everywhere.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:56 +0000 (21:26 +0200)]
cfg80211: managed mode wext compatibility
This adds code to make it possible to use the cfg80211
connect() API with wireless extensions, and because the
previous patch added emulation of that API with auth()
and assoc(), by extension also supports wext on that.
At the same time, removes code from mac80211 for wext,
but doesn't yet clean up mac80211's mlme code more.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 2 Jul 2009 07:13:27 +0000 (09:13 +0200)]
cfg80211: emulate connect with auth/assoc
This adds code to cfg80211 so that drivers (mac80211 right
now) that don't implement connect but rather auth/assoc can
still be used with the nl80211 connect command. This will
also be necessary for the wext compat code.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 1 Jul 2009 19:26:54 +0000 (21:26 +0200)]
cfg80211: connect/disconnect API
This patch introduces the cfg80211 connect/disconnect API.
The goal here is to run the AUTH and ASSOC steps in one call.
This is needed for some fullmac cards that run both steps
directly from the target, after the host driver sends a
connect command.
Additionally, all the new crypto parameters for connect()
are now also valid for associate() -- although associate
requires the IEs to be used, the information can be useful
for drivers and should be given.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:53 +0000 (21:26 +0200)]
wireless: define AKM suites
We'll need these values for some drivers using connect API
and for wext compat code, so let's define them.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:52 +0000 (21:26 +0200)]
mac80211: remove an unused function declaration
The ieee80211_scan_results function hasn't existed for a
long time now, so its declaration should be removed as
well.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:51 +0000 (21:26 +0200)]
cfg80211: introduce nl80211 testmode command
This introduces a new NL80211_CMD_TESTMODE for testing
and calibration use with nl80211. There's no multiplexing
like like iwpriv had, and the command is not available by
default, it needs to be explicitly enabled in Kconfig and
shouldn't be enabled in most kernels.
The command requires a wiphy index or interface index to
identify the device to operate on, and the new TESTDATA
attribute. There also is API for sending replies to the
command, and testmode multicast messages (on a testmode
multicast group).
I've also updated mac80211 to be able to pass through the
command to the driver, since it itself doesn't implement
the testmode command.
Additionally, to give people an idea of how to use the
command, I've added a little code to hwsim that makes use
of the new command to set the powersave mode, this is
currently done via debugfs and should remain there, and
the testmode command only serves as an example of how to
use this best -- with nested netlink attributes in the
TESTDATA attribute. A hwsim testmode tool can be found at
http://git.sipsolutions.net/hwsim.git/. This tool is BSD
licensed so people can easily use it as a basis for their
own internal fabrication and validation tools.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:50 +0000 (21:26 +0200)]
wext: constify extra argument to wireless_send_event
This is never changed by the function, so can be marked const.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:49 +0000 (21:26 +0200)]
mac80211: tell SME about real auth state
When the auth algorithm is rejected, but we don't have
another one to try, we will eventually retry but that
isn't useful -- we'll then do it again and again until
we eventually give up. Instead, we should let the SME
know and go into disabled state. The same applies for
situations where the AP rejects with any other status
code.
Additionally, when trying the next auth algorithm, we
should reset the auth_tries so that just a single lost
frame doesn't lead to us giving up on the third auth
algorithm.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:48 +0000 (21:26 +0200)]
cfg80211: remove wireless_dev->bssid
This variable isn't necessary -- the wext code keeps
track of the BSSID itself, and otherwise we have
current_bss.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:47 +0000 (21:26 +0200)]
cfg80211: use proper allocation flags
Instead of hardcoding GFP_ATOMIC everywhere, add a
new function parameter that gets the flags from the
caller. Obviously then I need to update all callers
(all of them in mac80211), and it turns out that now
it's ok to use GFP_KERNEL in almost all places.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:46 +0000 (21:26 +0200)]
nl80211: clean up function definitions
I don't like the 'extern' keyword much when it's not
necessary, it makes lines rather long.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:45 +0000 (21:26 +0200)]
cfg80211: move break statement to correct place
Move a break statement to the correct place _after_ the
#endif, otherwise w/o WIRELESS_EXT things break badly.
Also, while touching this code, do a cleanup and assign
dev->ieee80211_ptr to a new variable.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:44 +0000 (21:26 +0200)]
wext: default to y
The way I initially thought we could do wireless extensions
is by making all the compat code in cfg80211 be independent
of CONFIG_WIRELESS_EXT, but this is turning out to not be
feasible. Therefore, fix the Kconfig help text and make the
option default to yes, so people won't get a nasty surprise
when mac80211 will get rid of its 'select WIRELESS_EXT' any
time now.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:43 +0000 (21:26 +0200)]
mac80211: fix todo lock
The key todo lock can be taken from different locks
that require it to be _bh to avoid lock inversion
due to (soft)irqs.
This should fix the two problems reported by Bob and
Gabor:
http://mid.gmane.org/
20090619113049.GB18956@hash.localnet
http://mid.gmane.org/
4A3FA376.8020307@openwrt.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Bob Copeland <me@bobcopeland.com>
Cc: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 1 Jul 2009 19:26:42 +0000 (21:26 +0200)]
wext: allow returning NULL stats
Currently, wext drivers cannot return NULL for stats even though
that would make the ioctl return -EOPNOTSUPP because that would
mean they are no longer listed in /proc/net/wireless. This patch
changes the wext core's behaviour to list them if they have any
wireless_handlers, but only show their stats when available, so
that drivers can start returning NULL if stats are currently not
available, reducing confusion for e.g. IBSS.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 30 Jun 2009 20:55:52 +0000 (16:55 -0400)]
mac80211_hwsim: fix-up build damage from removal of skb->dst
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Fri, 19 Jun 2009 10:17:48 +0000 (12:17 +0200)]
ath9k: remove ath_rx_ps_back_to_sleep helper
This helper only clears the SC_OP_WAIT_FOR_{BEACON,CAB} flags.
Remove it and clear these flags directly in the approptiate
places instead.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gabor Juhos [Fri, 19 Jun 2009 10:17:47 +0000 (12:17 +0200)]
ath9k: remove unnecessary clearing of SC_OP_WAIT_{BEACON,CAB} flags
All SC_OP_WAIT_* flags will be cleared in 'ath9k_conf' when PS mode
is disabled, so we don't have to clear it here.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 19 Jun 2009 00:45:21 +0000 (02:45 +0200)]
cfg80211: send wext MLME-MICHAELMICFAILURE.indication
Instead of having mac80211 do it itself.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:35 +0000 (23:21 +0100)]
orinoco: remove WE nickname support
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:34 +0000 (23:21 +0100)]
orinoco: convert giwrange to cfg80211
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:33 +0000 (23:21 +0100)]
orinoco: convert scanning to cfg80211
This removes the custom scan cache used by orinoco.
We also have to avoid calling cfg80211_scan_done from the hard
interrupt, so we offload the entirety of scan processing to a workqueue.
This may behave strangely if you start scanning just prior to
suspending...
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:32 +0000 (23:21 +0100)]
orinoco: convert mode setting to cfg80211
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:31 +0000 (23:21 +0100)]
orinoco: provide generic commit function
This allows changes to be commited from cfg80211 functions.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:30 +0000 (23:21 +0100)]
orinoco: Handle suspend/restore in core driver
Each device does almost exactly the same things on suspend and resume
when upping and downing the interface. So move this logic into a common
routine.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:29 +0000 (23:21 +0100)]
airport: store irq in card private structure
... instead of relying on the net_device fields.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:28 +0000 (23:21 +0100)]
orinoco: move netdev interface creation to main driver
With the move to cfg80211 it's nice to keep the hardware operations
distinct from the interface, even though we can only support a single
interface.
This also means the driver resembles other cfg80211 drivers.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:27 +0000 (23:21 +0100)]
orinoco: make firmware download less verbose
The firmware download code has been in a couple of releases, without any
significant issues reported in this code.
Convert to use pr_debug, so the messages can be recoverred by defining
DEBUG.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:26 +0000 (23:21 +0100)]
orinoco: initiate cfg80211 conversion
Initialise and register a wiphy.
Store the orinoco_private structure in the new wiphy, and use the
net_device private area to store the wireless_dev. This results in a
change to the way we navigate from a net_device to the driver private
orinoco_private, which we encapsulate in the inline function ndev_priv.
Most of the remaining calls to netdev_priv are thus replaced by
ndev_priv.
We can immediately rely on cfg80211 to handle SIOCGIWNAME, so
orinoco_ioctl_getname is removed.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:25 +0000 (23:21 +0100)]
orinoco: Change set_tkip to use orinoco_private instead of hermes_t
hw.h does not include hermes.h, and none of the other functions
requires types from that file. Also hermes_t is a (discouraged) typedef
so we can't add a forward declaration. Therefore change this function to
use orinoco_private.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:24 +0000 (23:21 +0100)]
orinoco: initialise independently of netdev
Initialise the orinoco driver before registerring with netdev, which
will help when we get to cfg80211...
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:23 +0000 (23:21 +0100)]
orinoco: Replace net_device with orinoco_private in driver interfaces
Move away from using net_device as the main structure in orinoco
function calls. Use orinoco_private instead.
This makes more sense when we move to cfg80211, and we get wiphys as
well.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:22 +0000 (23:21 +0100)]
orinoco: firmware helpers should use dev_err and friends
We should be able to call these routines before we register with
netdev, so avoid printks using the netdev name.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:21 +0000 (23:21 +0100)]
orinoco: use dev_err in early initialisation routines
This allows us to use determine_fw_capabilities,
orinoco_hw_read_card_setting and orinoco_hw_allocate_fid prior to
netdev registration.
Since dev_dbg only prints if DEBUG is defined (or dynamic debug is
enabled), move a couple of the more useful prints up to info.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:20 +0000 (23:21 +0100)]
orinoco: Move FID allocation to hw.c
This is part of refactorring the initialisation code so that we can
load the firmware before registerring with netdev.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:19 +0000 (23:21 +0100)]
orinoco: Move card reading code into hw.c
This is part of refactorring the initialisation code so that we can
load the firmware before registerring with netdev.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:18 +0000 (23:21 +0100)]
orinoco: Move firmware capability determination into hw.c
This is part of refactorring the initialisation code so that we can load
the firmware before registerring with netdev.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:17 +0000 (23:21 +0100)]
cfg80211: infer WPA and WPA2 support from TKIP and CCMP
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:16 +0000 (23:21 +0100)]
cfg80211: set WE encoding size based on available ciphers
Only set the sizes for WEP40 and WEP104.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:15 +0000 (23:21 +0100)]
cfg80211: allow drivers that can't scan for specific ssids
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:14 +0000 (23:21 +0100)]
cfg80211: Advertise ciphers via WE according to driver capability
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
David Kilroy [Thu, 18 Jun 2009 22:21:13 +0000 (23:21 +0100)]
cfg80211: add wrapper function to get wiphy from priv pointer
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Thu, 18 Jun 2009 12:51:12 +0000 (14:51 +0200)]
mac80211_hwsim: clean up the skb before passing it back
We need to clean up the skb before we can copy it, this
is required for proper operation since the socket it is
still attached to could potentially live in a different
network namespace or so.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hin-Tak Leung [Thu, 18 Jun 2009 02:53:26 +0000 (03:53 +0100)]
zd1211rw: sort vid/pid pairs by numerical value
In the past ids were inserted in no particular order and it has
become hard to see what ids are already included or not. This
patch sorts the ids by numerical value and has no functional effect.
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 17 Jun 2009 15:41:49 +0000 (17:41 +0200)]
cfg80211: prohibit scanning the same channel more than once
It isn't very useful to scan the same channel more than once
during a given scan, and some hardware (notably iwlwifi) can
only scan a limited number of channels at a time. To prevent
any overflows, simply disallow scanning any channel multiple
times in a given scan command. This is a small change in the
userspace ABI, but the only user, wpa_supplicant, never asks
for a scan with the same frequency listed twice.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 17 Jun 2009 15:28:45 +0000 (17:28 +0200)]
mac80211: improve per-sta debugfs
We had code for a number of files, that we didn't publish
in debugfs, fix that. Also make the agg_status file layout
more readable and add more information to it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 17 Jun 2009 11:13:00 +0000 (13:13 +0200)]
mac80211: push rx status into skb->cb
Within mac80211, we often need to copy the rx status into
skb->cb. This is wasteful, as drivers could be building it
in there to start with. This patch changes the API so that
drivers are expected to pass the RX status in skb->cb, now
accessible as IEEE80211_SKB_RXCB(skb). It also updates all
drivers to pass the rx status in there, but only by making
them memcpy() it into place before the call to the receive
function (ieee80211_rx(_irqsafe)). Each driver can now be
optimised on its own schedule.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 16 Jun 2009 18:46:45 +0000 (20:46 +0200)]
rt2x00: remove skb->do_not_encrypt usage
Johannes is trying to get rid of the master netdev and in the process will
remove skb->do_not_encrypt field. This removes the do_not_encrypt
usage from rt2x00 to make the change easier.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Tue, 16 Jun 2009 17:56:42 +0000 (19:56 +0200)]
cfg80211: issue netlink notification when scan starts
To ease multiple apps working together smoothly,
send a notification when a scan is started.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Tue, 16 Jun 2009 14:17:32 +0000 (17:17 +0300)]
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>
Jussi Kivilinna [Tue, 16 Jun 2009 14:17:27 +0000 (17:17 +0300)]
usbnet: Add stop function pointer to 'struct rndis_data'.
Allow minidriver to know that netdev has stopped. This is to let
wireless turn off radio when usbnet dev is stopped.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Tue, 16 Jun 2009 14:17:21 +0000 (17:17 +0300)]
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>
Zhu Yi [Mon, 15 Jun 2009 19:59:56 +0000 (21:59 +0200)]
iwmc3200wifi: rfkill cleanup
The patch cleans up the unused rfkill related structures and flags.
It also adds wext and cfg80211 handlers for txpower auto and off so
that software rfkill could be issued by user space.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Mon, 15 Jun 2009 19:59:54 +0000 (21:59 +0200)]
iwmc3200wifi: cache keys when interface is down
When the interface is down and one sets a WEP key from userspace, we should
be able to simply cache it.
Since that implies setting part of the profile's security settings, we now
alloc/free the umac_profile at probe/remove time, and no longer at interface
bring up/down time. Simply resetting it during the latter is enough.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Zhu Yi [Mon, 15 Jun 2009 19:59:53 +0000 (21:59 +0200)]
iwmc3200wifi: change coexist periodic calibration flag
The patch changes coexist periodic calibration priority flag. It also
set wireless mode to UMAC and set PM control flag to 0x1.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Mon, 15 Jun 2009 19:59:52 +0000 (21:59 +0200)]
iwmc3200wifi: cfg80211 key hooks implemetation
This patch implements the new cfg80211 privacy related hooks: add/get/set_key
and the set_default_key one.
With this implementation we can now call the wext-compat *encode* routines and
reduce our own wext code.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Mon, 15 Jun 2009 19:59:51 +0000 (21:59 +0200)]
iwmc3200wifi: handling wifi_if_ntfy responses
When we're calling iwm_send_wifi_if_cmd() with the resp flag set, we're
currently waiting on the mlme queue, waiting for some flags here and there to
show up.
This patch adds a wifi_ntfy bitmap, and when we're sending a wifi_if command
expecting an answers, we wait synchronously for it to show up, on a dedicated
queue. The wifi_ntfy bit is set when we receive the corresponding answer.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Mon, 15 Jun 2009 19:59:50 +0000 (21:59 +0200)]
iwmc3200wifi: invalidate keys when changing the BSSID
While associated, we have to invalidate our key cache if we clear our BSSID
through siwap.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 12 Jun 2009 20:22:55 +0000 (13:22 -0700)]
iwlwifi: remove disable_tx_power for device > 4965
After 4965, tx_power_calibration moved from driver to uCode.
remove "disable_tx_power" from debugfs to minimize the confusion.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 12 Jun 2009 20:22:54 +0000 (13:22 -0700)]
iwlwifi: no need to refer to max_nrg_cck range value
max_nrg_cck value inside the sensitivity range structure is not needed
for sensitivity calibration.
Keep the parameter in sensitivity structure but set the value to "0" in case
needed in the future implementation.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 12 Jun 2009 20:22:53 +0000 (13:22 -0700)]
iwlwifi: modify sensitivity value for 5150
In 5150 there is a long delay between the AGC(Automatic Gain Control) command
till the RF is stabilized causing us to miss detections when there was
adjacent channel noise, so we need to adjusted the Sensitivity calibration
for 5150 differently.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 12 Jun 2009 11:17:53 +0000 (14:17 +0300)]
wl1251: change psm enabled/disabled info to debug
With shorter CAM timeouts, the logs get flooded with "psm enabled" and "psm
disabled traces. This patch changes it from wl1251_info to wl1251_debug, so
they are only shown if DEBUF_PSM is enabled.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Janne Ylalehto <janne.ylalehto@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:17:47 +0000 (14:17 +0300)]
wl1251: fix a checkpatch warning
drivers/net/wireless/wl12xx/wl1251_main.c:158: WARNING:
braces {} are not necessary for single statement blocks
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:17:39 +0000 (14:17 +0300)]
wl1251: use wl1251 prefix everywhere
Last we can change all code prefixes from wl12xx/WL12XX to
wl1251/WL1251.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:17:33 +0000 (14:17 +0300)]
wl12xx: remove unused wl12xx_hw_init_mem_config()
The function declaration is a leftover from some earlier, already
removed, code.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:17:25 +0000 (14:17 +0300)]
wl1251: rename wl12xx.h to wl1251.h
wl12xx.h is now only used by 1251 code, so we can rename it.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:17:19 +0000 (14:17 +0300)]
wl1251: add wl1251 prefix to all 1251 files
Now that all 1271 files are split, we can add wl1251_ prefix to the files.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:17:12 +0000 (14:17 +0300)]
wl1251: remove wl1271_setup()
We don't want to have any 1271 code in wl1251.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:17:06 +0000 (14:17 +0300)]
wl12xx: rename driver to wl1251
Rename driver to wl1251.ko in preparation for wl1271 driver.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:16:58 +0000 (14:16 +0300)]
wl12xx: rename wl1251.c wl1251_ops.c
In preparation to split wl12xx to wl1251 and wl1271.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Fri, 12 Jun 2009 11:16:52 +0000 (14:16 +0300)]
wl12xx: Use chipset specific join commands
Add implementation to use chipset specific join commands.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vidhya Govindan [Fri, 12 Jun 2009 11:16:45 +0000 (14:16 +0300)]
wl12xx: Assign value to rx msdu lifetime variable
The patch "wl12xx: cmd and acx interface rework" failed to assign MSDU
lifetime value in wl12xx_acx_rx_msdu_life_time() and breaks the functionality.
This patch fixes the regression by assigning the correct value.
Signed-off-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:16:39 +0000 (14:16 +0300)]
wl12xx: enable ELP mode
ELP mode is working now, let's enable it so that the firmware can sleep
and reduce power consumption.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:16:32 +0000 (14:16 +0300)]
wl12xx: check if elp wakeup failed
Check the return call from wl12xx_ps_elp_wakeup() and bail out if it
fails. This shouldn't happen, but if does there's a fundamental low
level issue.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:16:26 +0000 (14:16 +0300)]
wl12xx: optimise elp wakeup and sleep calls
The wakeup call was done too deep in code path, it's better to wakeup
chip from higher levels. This will also reduce wakeup calls significantly.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:16:20 +0000 (14:16 +0300)]
wl12xx: protect wl12xx_op_set_rts_threshold()
The function doesn't lock the mutex before sending the acx.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ari Kauppi [Fri, 12 Jun 2009 11:16:13 +0000 (14:16 +0300)]
wl12xx: Fix CMD_TEST regression via netlink.
CMD_TEST via netlink API has been broken since
e29c3f59cfbc38c3b481a2694b08962da19c4664: cmd and acx interface rework.
The user of the interface sends the request in a buffer without the
wl12xx_command header but expects the response to have the wl12xx_command
header (with id and status).
This patch reverts the e29c3f5 commit for cmd.c:wl12xx_cmd_test
and implements the needed wrapper functionality in netlink.c. Now the
API of wl12xx_cmd_test and rest of wl12xx_cmd_* commands in cmd.c are
similar.
Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ari Kauppi [Fri, 12 Jun 2009 11:16:07 +0000 (14:16 +0300)]
wl12xx: Fix incorrect warning message.
A warning message in wl12xx_acx_event_mbox_mask has a copy/paste
error. Fix it to print the correct acx command.
Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Fri, 12 Jun 2009 11:16:00 +0000 (14:16 +0300)]
wl12xx: Add support for block reading from a fixed register address
Add support for block reading (multiple bytes) from a fixed chipset
register address. This is required for the wl1271 TX data path.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Fri, 12 Jun 2009 11:15:54 +0000 (14:15 +0300)]
wl12xx: Moved wl1251 TX path implementation into chip specific files
Moved wl1251 TX path implementation into chip specific files to enable
parallel implementation for the wl1271 TX path.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 12 Jun 2009 11:15:46 +0000 (14:15 +0300)]
wl12xx: pass the wake up condition when configuring the wake up event
Changed the function wl12xx_acx_wake_up_conditions() so that it receives an
argument with the actual wake up condition, instead of having
WAKE_UP_EVENT_DTIM_BITMAP hardcoded. This is needed because we have to use
different conditions in 1271.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 12 Jun 2009 11:15:41 +0000 (14:15 +0300)]
wl12xx: add support for fixed address in wl12xx_spi_read
In the wl1271 implementation, we need to read memory from the register
partition using fixed addresses. This change adds the possibility to request
fixed address when calling wl12xx_spi_read() or wl12xx_spi_reg_read().
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 12 Jun 2009 11:15:33 +0000 (14:15 +0300)]
wl12xx: add support for new WL1271 chip revision
This patch adds the code that recognizes the new WL1271 chip revision (PG 2.0).
Full support for this chip is not yet implemented and support for WL1271 PG 1.0
is not guaranteed anymore.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 12 Jun 2009 11:15:27 +0000 (14:15 +0300)]
wl12xx: moved firmware version reading routine to chip-specific functions
With WL1271, the firmware version can only be read right after booting the
chip. To keep WL1251 aligned with this procedure, the code that reads the
firmware version initially has been moved to a common place where it can be
read from both chipsets.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Fri, 12 Jun 2009 11:15:22 +0000 (14:15 +0300)]
wl12xx: add wl12xx_spi_reg_read() and wl12xx_spi_reg_write() functions
In some cases we need to read more than 32 bits from the register area.
These functions were added to support that, like the existing
wl12xx_spi_mem_read() and wl12xx_spi_mem_write() already do for large blocks
in the memory area.
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Juuso Oikarinen [Fri, 12 Jun 2009 11:15:13 +0000 (14:15 +0300)]
wl12xx: removed chipset interrupt source configuration from fw wakeup
The chipset source interrupt source configuration during fw wakeup was
blocking interrupts on the wl1271. The configuration is effectively
unused here as it is used to trigger an interrupt for the chipset
wake-up event, which is not handled, or waited for, in the fw wakeup
anyway on either wl1251 or wl1271.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:15:08 +0000 (14:15 +0300)]
wl12xx: fix rx descriptor use
Rx descriptor was incorrectly allocated from stack, use struct wl12xx
instead. Needed for DMA transfers.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:15:00 +0000 (14:15 +0300)]
wl12xx: use wl12xx_mem_read32() to read the rx counter
As a side effect the transfer is now DMA safe.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:14:55 +0000 (14:14 +0300)]
wl12xx: allocate buffer the spi busy word from struct wl12xx
Needed for DMA transfers.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:14:47 +0000 (14:14 +0300)]
wl12xx: allocate buffer spi read/write command buffer kzalloc()
Needed for DMA safe transfers.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:14:41 +0000 (14:14 +0300)]
wl12xx: reserve buffer for partition command in struct wl12xx
This is now DMA safe.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Fri, 12 Jun 2009 11:14:34 +0000 (14:14 +0300)]
wl12xx: fix error handling in wl12xx_probe()
Resources were not freed properly in some cases.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>