aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-06-29Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-7/+6
2012-06-26Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-nextJohn W. Linville1-110/+93
2012-06-24mac80211: clean up debuggingJohannes Berg1-110/+93
There are a few things that make the logging and debugging in mac80211 less useful than it should be right now: * a lot of messages should be pr_info, not pr_debug * wholesale use of pr_debug makes it require *both* Kconfig and dynamic configuration * there are still a lot of ifdefs * the style is very inconsistent, sometimes the sdata->name is printed in front Clean up everything, introducing new macros and separating out the station MLME debugging into a new Kconfig symbol. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-22Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-nextJohn W. Linville1-8/+8
2012-06-21mac80211: clear ifmgd->bssid only after building DELBAEliad Peller1-7/+6
ieee80211_set_disassoc() clears ifmgd->bssid before building DELBA frames, resulting in frames with invalid bssid ("00:00:00:00:00:00"). Fix it by clearing ifmgd->bssid only after building all the needed frames. After this change, we no longer need to save the bssid (before clearing it), so remove the local array. Reported-by: Ido Yariv <ido@wizery.com> Cc: stable@vger.kernel.org Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-20mac80211: save wmm_acm per sdataYoni Divinsky1-5/+5
Save and configure the wmm_acm per sdata, rather than per hardware. If wmm_acm is saved per hardware when running two interfaces simultaneously on the same hardware one interface's wmm policy will be affected by the other interface. Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-20mac80211: use the correct capability info in ieee80211_set_associated()Luciano Coelho1-1/+1
If an AP is beaconing with different capabilities than the one we get in the associate response, we were still using the capabilities received in the beacons. One example is when the AP is beaconing with the short slot bit set to zero and then we try to connect to it with long slot. In this case, we would keep using long slot until the next beacon was received. Fix this by using the correct capability value when calling ieee80211_handle_bss_capability(). We were using cbss->capability, but we should use the bss_conf->assoc_capability instead. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-20mac80211: initialize sta pointer to avoid false-positive warningLuciano Coelho1-2/+2
Some compilers (eg. gcc 4.4.1 for ARM) report a false positive warning in mlme.c: net/mac80211/mlme.c: In function 'ieee80211_prep_connection': net/mac80211/mlme.c:3035: warning: 'sta' may be used uninitialized in this function This is a false positive because the place where 'sta' is used is inside an if with the same condition of where it is set: [...] if (!have_sta) { sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL); if (!sta) return -ENOMEM; } [...] if (!have_sta) { [...] sta->sta.supp_rates[cbss->channel->band] = rates; [...] For some reason the compiler doesn't understand this and warns. While this is not a problem in the code itself, we can avoid polluting the build logs with false positives by setting sta to NULL on declaration and checking for sta instead of !have_sta in the second if. Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-13Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-2/+2
Conflicts: drivers/net/wireless/ath/ath9k/main.c net/bluetooth/hci_event.c
2012-06-13mac80211: stop polling in disassociationDavid Spinadel1-2/+2
Stop connection monitor poll during disassociation. This clears the polling flags and if a scan was deferred it will be run. Without this fix, if a scan was deferred due to connection monitoring while disassociation happens, this scan blocks further scan requests until interface down/up which causes problems connecting to another AP. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-12Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-1/+1
Conflicts: MAINTAINERS drivers/net/wireless/iwlwifi/pcie/trans.c
2012-06-08mac80211: add back channel change flagStanislaw Gruszka1-1/+1
commit 24398e39c8ee4a9d9123eed322b859ece4d16cac Author: Johannes Berg <johannes.berg@intel.com> Date: Wed Mar 28 10:58:36 2012 +0200 mac80211: set HT channel before association removed IEEE80211_CONF_CHANGE_CHANNEL argument from ieee80211_hw_config, which is required by iwl4965 driver, otherwise that driver does not configure channel properly and is not able to associate. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06mac80211: do remain-on-channel while idleJohannes Berg1-6/+0
The IDLE handling in HW off-channel is broken right now since we turn off IDLE only when the off-channel period already started. Therefore, all drivers that use it today (only iwlwifi!) must support off-channel while idle, so playing with idle isn't needed at all. Off-channel in general, since it's no longer used for authentication/association, shouldn't affect PS, so also remove that logic. Also document a small caveat for reporting TX status from off-channel frames in HW remain-on-channel. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06mac80211: print info when disabling HTJohannes Berg1-3/+10
Make mac80211 print a message when it disables HT due to the connection using WEP/TKIP or due to the AP not supporting WMM/QoS. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-9/+27
Conflicts: drivers/net/wireless/iwlwifi/iwl-drv.c
2012-06-05mac80211: simplify association HT parametersJohannes Berg1-15/+11
Instead of passing around the entire HT information IE, extract only the HT parameters field and disable HT if the HT information IE isn't present and well- formed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05mac80211: remove ieee80211_get_operstate()Eliad Peller1-7/+0
ieee80211_get_operstate() was used by drivers in order to know whether the sta link is up, but it's no longer needed (nor used) as mac80211 notifies the drivers about authorization changes (via the sta_state callback) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05net: mac80211: Convert printk(KERN_DEBUG to pr_debugJoe Perches1-73/+58
Standardize the debugging to be able to use dynamic_debug. Coalesce formats, align arguments. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05mac80211: send beacon loss events to userspaceHolger Schurig1-0/+2
Send beacon loss events to userspace, so it will be able to initiate roaming before disconnection Signed-off-by: Holger Schurig <holgerschurig@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05mac80211: fail authentication when AP denied authenticationEliad Peller1-2/+2
ieee80211_rx_mgmt_auth() doesn't handle denied authentication properly - it authenticates the station and waits for association (for 5 seconds) instead of failing the authentication. Fix it by destroying auth_data and bailing out instead. Signed-off-by: Eliad Peller <eliad@wizery.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Cc: stable@vger.kernel.org #3.4 Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-04mac80211: run scan after finish connection monitoringStanislaw Gruszka1-9/+27
commit 133d40f9a22bdfd2617a446f1e3209537c5415ec Author: Stanislaw Gruszka <sgruszka@redhat.com> Date: Wed Mar 28 16:01:19 2012 +0200 mac80211: do not scan and monitor connection in parallel add bug, which make possible to start a scan and never finish it, so make every new scanning request finish with -EBUSY error. This can happen on code paths where we finish connection monitoring and clear IEEE80211_STA_*_POLL flags, but do not check if scan was deferred. This patch fixes those code paths. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-25mac80211: Fix race in checking AP status by sending null frameSoumik Das1-1/+2
mac80211 tries to verify the existence of the current AP by probing or sending a NULL frame in function ieee80211_mgd_probe_ap_send. It 1st sends a null frame to the AP, increments probe_send_count and waits for the ACK to the NULL frame for a finite duration of time. At times, it happens that by the time mac80211 gets to increment probe_send_count, the ACK for the NULL frame transmitted has already been processed. This leads to a race condition where mac80211 times out waiting for the ACK for the NULL frame causing unnecessary disconnection with the AP. Signed-off-by: Soumik Das <soumik.das@stericsson.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15net: Convert net_ratelimit uses to net_<level>_ratelimitedJoe Perches1-7/+5
Standardize the net core ratelimited logging functions. Coalesce formats, align arguments. Change a printk then vprintk sequence to use printf extension %pV. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-14Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-nextDavid S. Miller1-1/+1
2012-05-09mac80211: Convert compare_ether_addr to ether_addr_equalJoe Perches1-16/+13
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-08mac80211: fix rate control update on 2040 bss changeRajkumar Manoharan1-1/+1
The rate control updation never be called on 2040 BSS change. The station should update its rate control on receiving beacon with different HT mode in the HT operation IE. Not doing so, leads to sending frames with higher(ht40) rates whereas AP is operating in lower mode (ht20). Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Conflicts: drivers/net/ethernet/intel/e1000e/param.c drivers/net/wireless/iwlwifi/iwl-agn-rx.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c drivers/net/wireless/iwlwifi/iwl-trans.h Resolved the iwlwifi conflict with mainline using 3-way diff posted by John Linville and Stephen Rothwell. In 'net' we added a bug fix to make iwlwifi report a more accurate skb->truesize but this conflicted with RX path changes that happened meanwhile in net-next. In e1000e a conflict arose in the validation code for settings of adapter->itr. 'net-next' had more sophisticated logic so that logic was used. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-24mac80211: call ieee80211_mgd_stop() on interface stopEliad Peller1-1/+1
ieee80211_mgd_teardown() is called on netdev removal, which occurs after the vif was already removed from the low-level driver, resulting in the following warning: [ 4809.014734] ------------[ cut here ]------------ [ 4809.019861] WARNING: at net/mac80211/driver-ops.h:12 ieee80211_bss_info_change_notify+0x200/0x2c8 [mac80211]() [ 4809.030388] wlan0: Failed check-sdata-in-driver check, flags: 0x4 [ 4809.036862] Modules linked in: wlcore_sdio(-) wl12xx wlcore mac80211 cfg80211 [last unloaded: cfg80211] [ 4809.046849] [<c001bd4c>] (unwind_backtrace+0x0/0x12c) [ 4809.055937] [<c047cf1c>] (dump_stack+0x20/0x24) [ 4809.065385] [<c003e334>] (warn_slowpath_common+0x5c/0x74) [ 4809.075589] [<c003e408>] (warn_slowpath_fmt+0x40/0x48) [ 4809.088291] [<bf033630>] (ieee80211_bss_info_change_notify+0x200/0x2c8 [mac80211]) [ 4809.102844] [<bf067f84>] (ieee80211_destroy_auth_data+0x80/0xa4 [mac80211]) [ 4809.116276] [<bf068004>] (ieee80211_mgd_teardown+0x5c/0x74 [mac80211]) [ 4809.129331] [<bf043f18>] (ieee80211_teardown_sdata+0xb0/0xd8 [mac80211]) [ 4809.141595] [<c03b5e58>] (rollback_registered_many+0x228/0x2f0) [ 4809.153056] [<c03b5f48>] (unregister_netdevice_many+0x28/0x50) [ 4809.165696] [<bf041ea8>] (ieee80211_remove_interfaces+0xb4/0xdc [mac80211]) [ 4809.179151] [<bf032174>] (ieee80211_unregister_hw+0x50/0xf0 [mac80211]) [ 4809.191043] [<bf0bebb4>] (wlcore_remove+0x5c/0x7c [wlcore]) [ 4809.201491] [<c02c6918>] (platform_drv_remove+0x24/0x28) [ 4809.212029] [<c02c4d50>] (__device_release_driver+0x8c/0xcc) [ 4809.222738] [<c02c4e84>] (device_release_driver+0x30/0x3c) [ 4809.233099] [<c02c4258>] (bus_remove_device+0x10c/0x128) [ 4809.242620] [<c02c26f8>] (device_del+0x11c/0x17c) [ 4809.252150] [<c02c6de0>] (platform_device_del+0x28/0x68) [ 4809.263051] [<bf0df49c>] (wl1271_remove+0x3c/0x50 [wlcore_sdio]) [ 4809.273590] [<c03806b0>] (sdio_bus_remove+0x48/0xf8) [ 4809.283754] [<c02c4d50>] (__device_release_driver+0x8c/0xcc) [ 4809.293729] [<c02c4e2c>] (driver_detach+0x9c/0xc4) [ 4809.303163] [<c02c3d7c>] (bus_remove_driver+0xc4/0xf4) [ 4809.312973] [<c02c5a98>] (driver_unregister+0x70/0x7c) [ 4809.323220] [<c03809c4>] (sdio_unregister_driver+0x24/0x2c) [ 4809.334213] [<bf0df458>] (wl1271_exit+0x14/0x1c [wlcore_sdio]) [ 4809.344930] [<c009b1a4>] (sys_delete_module+0x228/0x2a8) [ 4809.354734] ---[ end trace 515290ccf5feb522 ]--- Rename ieee80211_mgd_teardown() to ieee80211_mgd_stop(), and call it on ieee80211_do_stop(). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-13mac80211: do not scan and monitor connection in parallelStanislaw Gruszka1-12/+23
Before we send probes in connection monitoring we check if scan is not pending. But we do that check without locking. Fix that and also do not start scan if connection monitoring is in progress. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-12Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-2/+1
2012-04-10mac80211: sanity check for null SSIDStanislaw Gruszka1-3/+16
While associated we should never have empty SSID, but life can be full of surprises, and is allways better to print a warning than crash. Before memcpy() in ieee80211_probereq_get() check ssid_len instead of ssid pointer, sice pointer it always passed by "ssidie + 2" expression to send probe functions, so practically never can be NULL. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: use IEEE80211_NUM_ACSJohannes Berg1-3/+4
When comparing hw->queues to determine if the device is QoS capable, use IEEE80211_NUM_ACS instead of just 4. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: notify driver of rate control updatesJohannes Berg1-1/+1
Devices that have internal rate control need to be notified when the bandwidth or SMPS state changes just like external rate control algorithms get a notification now. Add this notification and clarify the change bits while at it, the HT_CHANGED bit really meant only bandwidth changed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: remove queue stop on rate control updateJohannes Berg1-19/+0
We currently stop the queue when changing the rate control between 20/40 MHz in the BSS. This seems to have been necessary when we actually changed the channel, but now that we just update the station it doesn't seem right any more. Remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: remove channel type argument from rate_updateJohannes Berg1-16/+35
The channel type argument to the rate_update() callback isn't really the correct way to give the rate control algorithm about the desired RX bandwidth of the peer. Remove this argument, and instead update the STA capabilities with 20/40 appropriately. The SMPS update done by this callback works in the same way, so this makes the callback cleaner. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-10mac80211: set HT channel before associationJohannes Berg1-115/+111
Changing the channel type during operation is confusing to some drivers and will be hard to handle in multi-channel scenarios. Instead of changing the channel, set it to the right HT channel before authenticating/associating and don't change it -- just update the 20/40 MHz restrictions in rate control as needed when changed by the AP. This also fixes a problem that Paul missed in his fix for the "regulatory makes us deaf" issue -- when we couldn't use 40 MHz we still associated saying we were using 40 MHz, which could in similarly broken APs make us never even connect successfully. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: when receiving DTIM disable power-save mode only if it was enabledRonald Wahl1-3/+5
When receiving DTIM we currently disable power save mode in the hardware unconditionally, i.e. also when the hardware was not sleeping. This causes trouble with at least one wireless chipset (Ralink RT3572). When the hardware is not sleeping and we send a wakeup command (e.g. this happens after a scan) then a significant decrease of the link quality or a disconnect may occur. Disabling power save mode only when it was enabled prevents this issue. Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com> Reviewed-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09wireless: rename ht_info to ht_operationJohannes Berg1-24/+25
Since some of the HT code pre-dates 802.11n-2009 some names are wrong. The one that bothers me most is that "HT operation" is called "HT information" in our code and that causes confusion. Rename "HT information" to "HT operation" and also the control_chan field to primary_chan to match the name used in the spec. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: flush to get the tx status of nullfunc frame immediatelyRajkumar Manoharan1-0/+2
Sometimes the probe frame (nullfunc) is stuck at the hw queue. so that the mac80211 terminates the connection as it wont see the tx status. Instead of waiting for long period for ack status, lets call flush to get nullfunc status immediately. It also helps to send the nullfunc till max tries reached. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: do not send pspoll when powersave is disabledRajkumar Manoharan1-1/+1
There might be latency at AP side to update TIM IE which could cause the station to send pspoll frame even after the wakeup. If the powersave is disabled, the nullfunc notification alone is sufficient to receive frames from the AP. And if the pspoll frame was already sent, no need to resend the frame till it was acked by AP. Cc: Jouni Malinen <jouni@qca.qualcomm.com> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09mac80211: fix association beacon wait timeoutJohannes Berg1-2/+1
The TU_TO_EXP_TIME() macro already includes the "jiffies +" piece of the calculation, so don't add jiffies again. Reported-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Oliver Hartkopp <socketcan@hartkopp.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-15mac80211: make uapsd_* keys per-vifEliad Peller1-3/+5
uapsd_queues and uapsd_max_sp_len are relevant only for managed interfaces, and can be configured differently for each vif. Move them from the local struct to sdata->u.mgd, and update the debugfs functions accordingly. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-13mac80211: Don't let regulatory make us deafPaul Stewart1-16/+16
When regulatory information changes our HT behavior (e.g, when we get a country code from the AP we have just associated with), we should use this information to change the power with which we transmit, and what channels we transmit. Sometimes the channel parameters we derive from regulatory information contradicts the parameters we used in association. For example, we could have associated specifying HT40, but the regulatory rules we apply may forbid HT40 operation. In the situation above, we should reconfigure ourselves to transmit in HT20 only, however it makes no sense for us to disable receive in HT40, since if we associated with these parameters, the AP has every reason to expect we can and will receive packets this way. The code in mac80211 does not have the capability of sending the appropriate action frames to signal a change in HT behaviour so the AP has no clue we can no longer receive frames encoded this way. In some broken AP implementations, this can leave us effectively deaf if the AP never retries in lower HT rates. This change breaks up the channel_type parameter in the ieee80211_enable_ht function into a separate receive and transmit part. It honors the channel flags set by regulatory in order to configure the rate control algorithm, but uses the capability flags to configure the channel on the radio, since these were used in association to set the AP's transmit rate. Signed-off-by: Paul Stewart <pstew@chromium.org> Cc: Sam Leffler <sleffler@chromium.org> Cc: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Luis R Rodriguez <mcgrof@frijolero.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-13mac80211: rename bss_conf timestamp to last_tsfJohannes Berg1-1/+1
This value is not really very useful by itself, yet some drivers (including iwlwifi until I can figure out what it should do) use it. At least rename it to "last_tsf" to indicate the meaning and add a note that it may be really old. I suspect the value may become useful combined with the rx_status->mactime, but we don't (yet) store that value and pass it to the driver. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12mac80211: set basic rates earlierJohannes Berg1-48/+49
The authentication and association handshake already happens in the context of the new BSS, and the basic rates are needed at least for the ACK response frame to the authentication or association response frames. Therefore the basic rates should already be configured into the driver when those frames are sent. Change the logic to set up the basic rates in the connection preparation that happens for authentication and association (if needed). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12mac80211: refactor common auth/assoc setup codeJohannes Berg1-62/+59
As associating is possible without first authenticating (for FT over DS) association also has to be able to switch to the right channel, insert the station entry etc. Factor out this common code into a new function called ieee80211_prep_connection(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12mac80211: remove spurious BSSID change flagJohannes Berg1-3/+0
The BSSID has been set a lot earlier already and didn't change again in ieee80211_set_associated(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12mac80211: simplify wmm check during associationJohannes Berg1-5/+5
Instead of setting assoc_data->wmm_used solely based on the BSS also take into account our own capabilities and later check those. Also rename "wmm_used" and "uapsd_used" to just "wmm" and "uapsd". Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12mac80211: simplify HT checksJohannes Berg1-31/+26
Always set/use IEEE80211_STA_DISABLE_11N instead of duplicating the queue, WMM and HT checks in all places. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12mac80211: move misplaced commentJohannes Berg1-7/+7
Looks like some changes in this area moved the code but not the comment that belongs to the code, move it to the right place. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>