aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-08-10Merge branch 'master' into for-nextJiri Kosina2-14/+2
Conflicts: arch/arm/mach-omap1/board-nokia770.c
2010-08-09Fix spelling fuction -> function in commentsStefan Weil1-1/+1
To avoid more patches, I also fixed other spelling and grammar bugs when they were in the same or following line: successfull -> successful parse -> parses controler -> controller controlers -> controllers Cc: Jiri Kosina <trivial@kernel.org> Cc: linux-kernel@vger.kernel.org Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-08-04mac80211: Fix compilation warning when CONFIG_INET is not setJuuso Oikarinen1-0/+2
The warning is: net/mac80211/main.c:688: warning: label ‘fail_ifa’ defined but not used Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-04mac80211: fix scan locking wrt. hw scanJohannes Berg1-14/+0
Releasing the scan mutex while starting scans can lead to unexpected things happening, so we shouldn't do that. Fix that and hold the mutex across the scan triggering. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-29Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville13-40/+110
2010-07-29mac80211: allow drivers to request DTIM periodJohannes Berg4-3/+77
Some features require knowing the DTIM period before associating. This implements the ability to wait for a beacon in mac80211 before assoc to provide this value. It is optional since most likely not all drivers will need this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-28mac80211: inform drivers about the off-channel status on channel changesFelix Fietkau1-0/+3
For some drivers it can be useful to know whether the channel they're supposed to switch to is going to be used for short off-channel work or scanning, or whether the hardware is expected to stay on it for a while longer. This is important for various kinds of calibration work, which takes longer to complete and should keep some persistent state, even if the channel temporarily changes. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-28Revert "mac80211: fix sw scan bracketing"Luis R. Rodriguez1-2/+2
This reverts this commit. While in theory the change is correct the patch does not address current assumptions made by some drivers, one which is definitley affected is ath9k. Prior to this change the scan complete callback would be called after we returned to the home channel and configured the hardware RX filters. After this change we call the scan complete callback prior to both the hw config and the config filter. At least for ath9k this breaks quite a few assumptions on the callback, leading to disconnects to the AP after every scan making the driver pretty useless on STA mode. The goal behind this commit was to address the now understood spurious warnings from ath9k and mac80211_hwsim on scanning on two wiphys at the same time but we have now supressed these and will address this issue in the next kernel release. When fixing this for good next we must first review the other driver's dependence on this logic and perhaps consider removal of the scan complete callback all together. Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-28mac80211: Put some code under MESH macroYuri Ershov1-0/+2
In the function ieee80211_subif_start_xmit the logic related with meshdrlen is under CONFIG_MAC80211_MESH macro, but in one place it isn't. This is some update for this Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-27Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-1/+1
Conflicts: drivers/net/bnx2x_main.c Merge bnx2x bug fixes in by hand... :-/ Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-27mac80211: Fix key freeing to handle unlinked keysJouni Malinen4-12/+12
Key locking simplification removed key->sdata != NULL verification from ieee80211_key_free(). While that is fine for most use cases, there is one path where this function can be called with an unlinked key (i.e., key->sdata == NULL && key->local == NULL). This results in a NULL pointer dereference with the current implementation. This is known to happen at least with FT protocol when wpa_supplicant tries to configure the key before association. Avoid the issue by passing in the local pointer to ieee80211_key_free(). In addition, do not clear the key from hw_accel or debugfs if it has not yet been added. At least the hw_accel one could trigger another NULL pointer dereference. Signed-off-by: Jouni Malinen <j@w1.fi> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-27Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6John W. Linville4-4/+4
Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-26Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6David S. Miller1-1/+1
2010-07-26mac80211: Don't set per-BSS QoS for monitor interfacesSujith1-2/+6
In AP mode, there is no need to notify the driver about QoS changes for the monitor interface that is created. The warning in ieee80211_bss_info_change_notify() would be hit otherwise. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26mac80211: fix sta assignmentJohannes Berg1-12/+5
I just had the following: WARNING: at drivers/net/wireless/iwlwifi/iwl-agn-tx.c:574 iwlagn_tx_skb+0x1576/0x15f0 [iwlagn]() Call Trace: <IRQ> [<ffffffff8105c5df>] warn_slowpath_common+0x7f/0xc0 [<ffffffff8105c63a>] warn_slowpath_null+0x1a/0x20 [<ffffffffa0290b46>] iwlagn_tx_skb+0x1576/0x15f0 [iwlagn] [<ffffffffa027076c>] iwl_mac_tx+0x5c/0x260 [iwlagn] [<ffffffffa01bdf5b>] __ieee80211_tx+0x10b/0x1a0 [mac80211] [<ffffffffa01bfb86>] ieee80211_tx_pending+0x186/0x2d0 [mac80211] [<ffffffff81062ea5>] tasklet_action+0x125/0x130 [<ffffffff810634a6>] __do_softirq+0x106/0x270 [<ffffffff8100c09c>] call_softirq+0x1c/0x30 iwlagn 0000:02:00.0: Attempting to modify non-existing station 107 Note that 107 == 0x6b which is slab poison. The reason is that mac80211 passed a freed station pointer to mac80211, because as it happened iwlwifi reset itself while mac80211 was disconnecting from the network. It turns out that we do take care to look up the station pointer in ieee80211_tx_pending_skb, but then don't use it, which obviously is a bug. Fix this by removing the ieee80211_tx_h_sta handler and assigning the station pointer directly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26mac80211: remove bogus rcu_read_lock()Johannes Berg1-6/+1
Another remnant of the previous key locking scheme needs to be removed -- this causes a warning otherwise as ieee80211_set_default_mgmt_key will acquire a mutex. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26mac80211: freeing the wrong variableDan Carpenter1-1/+1
The intent was to free "msp->ratelist" here. "msp->sample_table" is always NULL at this point. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26minstrel: don't complain about feedback for unrequested ratesJohn W. Linville1-1/+0
"It's not problematic if minstrel gets feedback for rates that it doesn't have in its list, it should just ignore it. - Felix" Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Felix Fietkau <nbd@openwrt.org>
2010-07-26minstrel_ht: remove unnecessary NULL check in minstrel_ht_update_capsJohn W. Linville1-1/+1
If sta is NULL, we will have problems long before we get here... Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: Felix Fietkau <nbd@openwrt.org>
2010-07-23Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller8-59/+77
Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-21mac80211: proper IBSS lockingJohannes Berg2-50/+54
IBSS has never had locking, instead relying on some memory barriers etc. That's hard to get right, and I think we had it wrong too until the previous patch. Since this is not performance sensitive, it doesn't make sense to have the maintenance overhead of that, so add proper locking. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-21mac80211: fix IBSS lockdep complaintJohannes Berg1-5/+14
Bob reported a lockdep complaint originating in the mac80211 IBSS code due to the common work struct patch. The reason is that the IBSS and station mode code have different locking orders for the cfg80211 wdev lock and the work struct (where "locking" implies running/canceling). Fix this by simply not canceling the work in the IBSS code, it is not necessary since when the REQ_RUN bit is cleared, the work will run without effect if it runs. When the interface is set down, it is flushed anyway, so there's no concern about it running after memory has been invalidated either. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=16419 Additionally, looking into this I noticed that there's a small window while the IBSS is torn down in which the work may be rescheduled and the REQ_RUN bit be set again after leave() has cleared it when a scan finishes at exactly the same time. Avoid that by setting the ssid_len to zero before clearing REQ_RUN which signals to the scan finish code that this interface is not active. Reported-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-21mac80211: refuse shared key auth when WEP is unavailableJohannes Berg1-0/+2
When WEP is not available, we should reject shared key authentication because it could never succeed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20mac80211: set carrier on for monitor interfaces on ieee80211_openDavid Gnedt1-0/+2
If a station interface is reused as monitor interface it is possible that the carrier is still set to off. This breaks packet injection on that monitor interface. Force the carrier on in monitor interface initialisation like it is also done for other interface types (e.g. adhoc, mesh point, ap). Signed-off-by: David Gnedt <david.gnedt@davizone.at> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20mac80211: move QoS-enable to BSS infoJohannes Berg3-12/+10
Ever since commit e1b3ec1a2a336c328c336cfa5485a5f0484cc90d Author: Stanislaw Gruszka <sgruszka@redhat.com> Date: Mon Mar 29 12:18:34 2010 +0200 mac80211: explicitly disable/enable QoS mac80211 is telling drivers, in particular iwlwifi, whether QoS is enabled or not. However, this is only relevant for station mode, since only then will any device send nullfunc frames and need to know whether they should be QoS frames or not. In other modes, there are (currently) no frames the device is supposed to send. When you now consider virtual interfaces, it becomes apparent that the current mechanism is inadequate since it enables/disables QoS on a global scale, where for nullfunc frames it has to be on a per-interface scale. Due to the above considerations, we can change the way mac80211 advertises the QoS state to drivers to only ever advertise it as "off" in station mode, and make it a per-BSS setting. Tested-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20mac80211: fix aggregation action frame handling with AP VLANsFelix Fietkau1-2/+2
When aggregation related action frames are enqueued for further work, and they originate from a STA that is part of an AP VLAN, they are currently enqueued for the AP interface. This breaks the sta_info_get() lookup in the actual work function, and because of that, aggregation sessions are not established for this STA. Fix this by replacing the sta_info_get call with a call to sta_info_get_bss. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: use netif_rx_ni in ieee80211_send_layer2_updateJohn W. Linville1-1/+1
These synthetic frames are all triggered from userland requests in process context. https://bugzilla.kernel.org/show_bug.cgi?id=16412 Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-16mac80211: improve error checking if WEP fails to initJohn W. Linville1-1/+4
Do this by poisoning the values of wep_tx_tfm and wep_rx_tfm if either crypto allocation fails. Reported-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-16mac80211: skip HT parsing if HW does not support HTChristian Lamparter1-1/+1
This patch will also fix the odd freeze which occurred when minstrel_ht connects to an 802.11n network with legacy hardware. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-13Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville8-23/+34
Conflicts: drivers/net/wireless/wl12xx/wl1271_cmd.h
2010-07-08mac80211: remove wep dependencyJohn W. Linville7-21/+30
The current mac80211 code assumes that WEP is always available. If WEP fails to initialize, ieee80211_register_hw will always fail. In some cases (e.g. FIPS certification), the cryptography used by WEP is unavailable. However, in such cases there is no good reason why CCMP encryption (or even no link level encryption) cannot be used. So, this patch removes mac80211's assumption that WEP (and TKIP) will always be available for use. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02minstrel_ht: fix check for downgrading of top2 rateMing Lei1-2/+2
The check should be against current top2 rate, instead of current top rate. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-02minstrel_ht: fix updating rate with best probabilityMing Lei1-0/+2
The throughput should be considered when updating rate with best probability. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller14-52/+137
Conflicts: drivers/net/wireless/libertas/host.h
2010-06-30mac82011: Allow selection of minstrel_ht as default rc algorithmHelmut Schaa1-0/+1
Allow selection of minstrel_ht as default rate control algorithm. At the moment minstrel_ht can only be requested by the driver code but not selected as default in make menuconfig. Fix this by using minstrel_ht when minstrel was selected as default and minstrel_ht is available. This change won't affect legacy devices as minstrel_ht falls back to minstrel in that case. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-29mac80211: add basic tracing to drv_get_surveyJohn W. Linville2-1/+28
Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-29mac80211: remove unnecessary check in ieee80211_dump_surveyJohn W. Linville1-3/+0
This check is duplicated in drv_get_survey. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-28mac80211: fix the for_each_sta_info macroFelix Fietkau1-8/+8
Because of an ambiguity in the for_each_sta_info macro, it can currently only be used if the third parameter is set to 'sta'. Fix this by renaming the parameter to '_sta'. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-28mac80211: use netif_receive_skb in ieee80211_tx_status callpathJohn W. Linville1-2/+2
This avoids the extra queueing from calling netif_rx. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-28mac80211: use netif_receive_skb in ieee80211_rx callpathJohn W. Linville1-5/+5
This avoids the extra queueing from calling netif_rx. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-24cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm unitsJuuso Oikarinen1-11/+11
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>
2010-06-24mac80211: avoid scheduling while atomic in mesh_rx_plink_frameJohn W. Linville1-11/+31
While mesh_rx_plink_frame holds sta->lock... mesh_rx_plink_frame -> mesh_plink_inc_estab_count -> ieee80211_bss_info_change_notify ...but ieee80211_bss_info_change_notify is allowed to sleep. A driver taking advantage of that allowance can cause a scheduling while atomic bug. Similar paths exist for mesh_plink_dec_estab_count, so work around those as well. http://bugzilla.kernel.org/show_bug.cgi?id=16099 Also, correct a minor kerneldoc comment error (mismatched function names). Signed-off-by: John W. Linville <linville@tuxdriver.com> Cc: stable@kernel.org
2010-06-24minstrel_ht: move minstrel_mcs_groups declaration to header fileJohn W. Linville2-2/+2
Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Felix Fietkau <nbd@openwrt.org>
2010-06-24minstrel_ht: make *idx unsigned in minstrel_downgrade_rateJohn W. Linville1-1/+2
net/mac80211/rc80211_minstrel_ht.c:440:46: warning: incorrect type in argument 2 (different signedness) net/mac80211/rc80211_minstrel_ht.c:440:46: expected int *idx net/mac80211/rc80211_minstrel_ht.c:440:46: got unsigned int *<noident> net/mac80211/rc80211_minstrel_ht.c:446:46: warning: incorrect type in argument 2 (different signedness) net/mac80211/rc80211_minstrel_ht.c:446:46: expected int *idx net/mac80211/rc80211_minstrel_ht.c:446:46: got unsigned int *<noident> Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Felix Fietkau <nbd@openwrt.org>
2010-06-24mac80211: don't shadow mgmt variable in ieee80211_rx_h_actionJohn W. Linville1-4/+4
net/mac80211/rx.c:2059:39: warning: symbol 'mgmt' shadows an earlier one net/mac80211/rx.c:1916:31: originally declared here Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-21mac80211: Add interface for driver to temporarily disable dynamic psJuuso Oikarinen2-1/+40
This mechanism introduced in this patch applies (at least) for hardware designs using a single shared antenna for both WLAN and BT. In these designs, the antenna must be toggled between WLAN and BT. In those hardware, managing WLAN co-existence with Bluetooth requires WLAN full power save whenever there is Bluetooth activity in order for WLAN to be able to periodically relinquish the antenna to be used for BT. This is because BT can only access the shared antenna when WLAN is idle or asleep. Some hardware, for instance the wl1271, are able to indicate to the host whenever there is BT traffic. In essence, the hardware will send an indication to the host whenever there is, for example, SCO traffic or A2DP traffic, and will send another indication when the traffic is over. The hardware gets information of Bluetooth traffic via hardware co-existence control lines - these lines are used to negotiate the shared antenna ownership. The hardware will give the antenna to BT whenever WLAN is sleeping. This patch adds the interface to mac80211 to facilitate temporarily disabling of dynamic power save as per request of the WLAN driver. This interface will immediately force WLAN to full powersave, hence allowing BT coexistence as described above. In these kind of shared antenna desings, when WLAN powersave is fully disabled, Bluetooth will not work simultaneously with WLAN at all. This patch does not address that problem. This interface will not change PSM state, so if PSM is disabled it will remain so. Solving this problem requires knowledge about BT state, and is best done in user-space. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-21mac80211: Fix compile warning in scan.c.Gertjan van Wingerde1-1/+1
Fix the following compile warning: CC [M] net/mac80211/scan.o net/mac80211/scan.c: In function 'ieee80211_request_internal_scan': net/mac80211/scan.c:749:23: warning: comparison between 'enum nl80211_band' and 'enum ieee80211_band' caused by the local variable band not being of the proper 'ieee80211_band' type. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-18mac80211: fix sw scan bracketingJohannes Berg1-2/+2
Currently, detection in hwsim and ath9k can detect that two sw scans are in flight at the same time, which isn't really true. It is caused by a race condition, because the scan complete callback is called too late, after the lock has been dropped, so that a new scan can be started before it is called. It is also called too early semantically, as it is currently called _after_ the return to the operating channel -- it should be before so that drivers know this is the operating channel again. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-17Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller28-1009/+1186
2010-06-17Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville2-2/+39
Conflicts: net/mac80211/mlme.c