summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-10mac80211: provide SSID in IBSS modeMarek Puzyniak
Some drivers need SSID in AP and IBSS mode. AP SSID is provided through BSS_CHANGED_SSID notification. There was no easy way to do the same for IBSS. In IBSS mode SSID is known but was not stored in BSS configuration. Extend the AP-mode functionality to also work in IBSS mode. Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10mac80211: always advertise STBC/MCSes even if no AP supportJohannes Berg
Advertise STBC capabilities and MCS rates even if the AP doesn't support them. This has always been the right thing to do, but used to be problematic with some APs. Now WFA testing requires this so re-enable it, problematic APs would then presumably not pass the test and be fixed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10mac80211: clear SSID when stopping APMarek Puzyniak
When AP interface is stopped ssid_len in the BSS configuration isn't cleared which can confuse drivers when switching modes. Set the length to zero when stopping the AP interface. Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10mac80211: fix recalc_radar hwconf sync problemSimon Wunderlich
local->hw.conf maybe not be synced when recalcing whether radar is enabled, sometimes leaving radar enabled even if it's not neccesary anymore. Fix this by: * setting radar_enabled when creating the chanctx * turning radar_enabled off before destroying the last channel context Reported-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10mac80211: stringify another plink stateThomas Pedersen
The patch "mac80211: stringify mesh peering events" missed an opportunity to print the peering state as a string. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10mac80211: unset FC retry bit in mesh fwding pathThomas Pedersen
Otherwise forwarded frames would keep the retry bit set from the previous link transmission. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-10mac80211_hwsim: Register and bind to driverMartin Pitt
Properly register our mac80211_hwsim_driver, attach it to the platform bus. Bind newly created hwsim devices to that driver, so that our wlan devices get a proper "driver" sysfs attribute. This makes mac80211_hwsim interfaces work with NetworkManager. Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com> [fix an old and a new message to not be line-broken, also fix the driver_register error path] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: make ieee802_11_parse_elems an inlineJohannes Berg
This (slightly) reduces the code size. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: don't start new netdev queues if driver stoppedJohannes Berg
If a new netdev (e.g. an AP VLAN) is created while the driver has queues stopped, the new netdev queues will be started even though they shouldn't. This will lead to frames accumulating on the internal mac80211 pending queues instead of properly being held on the netdev queues. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: replace some dead code by a warningJohannes Berg
Given the (nested) switch statements, this code can't be reached, so make it warn instead of manipulating the carrier state which seems purposeful. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: don't fiddle with netdev queues in MLME codeJohannes Berg
The netdev queues should always represent the state that the driver gave them, so fiddling with them isn't really appropriate in the mlme code. Also, since we stop queues for flushing now, this really isn't necessary any more. As the scan/offchannel code has also been modified to no longer do this a while ago, remove the outdated smp_mb() and comments about it. While at it, also add a pair of braces that was missing. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: disable uAPSD if all ACs are under ACMAlexander Bondar
It's unlikely that an AP requires WMM mandatory admission control for all access categories, and if it does then we still transmit on the background AC without requesting admission. However, avoid using uAPSD in this case since the implementation could run into issues and might use other ACs etc. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: fix do_stop handling while suspendedJohannes Berg
When a device is unplugged while suspended, mac80211 is de-initialized and all interfaces are removed while no state is actually present in the driver. This can cause warnings and driver confusion. Fix this by reordering the do_stop code to not call the driver when it is suspended, i.e. when there's no state in the driver anyway. The previous patches removed a few corner cases in ROC and virtual monitor interfaces so that now this is safe to do and no state should be left over. Reported-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: destroy virtual monitor interface across suspendJohannes Berg
It has to be removed from the driver, but completely destroying it helps handle unplug of a device during suspend since then the channel context handling etc. doesn't have to happen later when it's removed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: purge remain-on-channel items when suspendingJohannes Berg
They can't really be executed while suspended and could trigger work warnings, so abort all ROC items. When the system resumes the notifications about this will be delivered to userspace which can then act accordingly (though it will assume they were canceled/finished.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: remove outdated comment referring to master interfaceJohannes Berg
The code now explicitly calls ieee80211_configure_filter() anyway, so nothing needs to be explained. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: return new mpath from mesh_path_add()Bob Copeland
Most times that mesh_path_add() is called, it is followed by a lookup to get the just-added mpath. We can instead just return the new mpath in the case that we allocated one (or the existing one if already there), so do that. Also, reorder the code in mesh_path_add a bit so that we don't need to allocate in the pre-existing case. Signed-off-by: Bob Copeland <bob@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: fix the PREP mesh hwmp debug messageChun-Yeow Yeoh
The mesh hwmp debug message is a bit confusing. The "sending PREP to %p" should be the MAC address of mesh STA that has originated the PREQ message and the "received PREP from %pM" should be the MAC address of the mesh STA that has originated the PREP message. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: parse Timeout Interval Element using a structJohannes Berg
Instead of open-coding the accesses and length check do the length check in the IE parser and assign a struct pointer for use in the remaining code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: check ERP info IE length in parserJohannes Berg
It's always just one byte, so check for that and remove the length field from the parser struct. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: check DSSS params IE length in parserJohannes Berg
It's always just one byte, so check for that and remove the length field from the parser struct. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: remove unused IE pointers from parserJohannes Berg
There's no need to parse IEs that aren't used so just remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: remove ancient reference to master interfaceJohannes Berg
The master interface no longer exists ... and hasn't for a few years now, so remove this reference :-) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: be more careful about sending beacon-loss-eventsBen Greear
I don't think we should send the events unless it was actually a beacon that was lost...not just any probe of an AP. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: add beacon stats to debugfsBen Greear
Beacon-timeout and number of beacon loss events. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211_hwsim: advertise VHT support also when channels == 1Karl Beldan
Drivers can now advertise VHT support even if they don't use channel contexts. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-04-08mac80211: let drivers not supporting channel contexts use VHTKarl Beldan
It is possible since the global hw config and local switched to cfg80211_chan_def. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-25mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chanKarl Beldan
Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> [fix kernel-doc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-25mac80211: allow drivers to set default uAPSD parametersAlexander Bondar
mac80211 currently sets uAPSD parameters to have VO AC trigger- and delivery-enabled, with maximum service period length. Allow drivers to change these default settings since different uAPSD client implementations may handle errors differently and be able to recover from some errors. Note: some APs may not function correctly if one or all ACs are trigger- and delivery-enabled, see http://thread.gmane.org/gmane.linux.kernel.wireless.general/93577. We retested with this AP and later firmware doesn't have this bug any more. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-25mac80211: ibss: use beacon_data struct for beacon and probe responseJohannes Berg
Instead of having an SKB all the time, use a beacon_data struct with just the information required. This also allows removing a synchronize_rcu() and using kfree_rcu() instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-25mac80211: ibss: disable beaconing before freeing beaconJohannes Berg
If we don't disable beaconing, the driver might attempt to continue, but would fail to request a beacon. That's strange, so disable beaconing first. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-25cfg80211: Document update_ft_ies() cfg80211_opsJouni Malinen
This was forgotten from the commit that added support for FT operations with drivers that implement SME. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-22mac80211: add P2P NoA settingsJanusz Dziedzic
Add P2P NoA settings for STA mode. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> [fix docs] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-22mac80211: use ieee80211_p2p_noa_attr structureJanusz Dziedzic
Use ieee80211_p2p_noa_attr structure during P2P_PS (oppps) detection. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-22cfg80211: add P2P Notice of Absence attributeJanusz Dziedzic
Add P2P Notice of Absence attribute structure. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-22mac80211: make beacon-loss-count configurableBen Greear
On loaded systems with lots of VIFs, I see lots of beacon timeouts, even though the connection to the AP is very good. Allow tuning the beacon-loss-count variable to give the system longer to process beacons if the user prefers. Signed-off-by: Ben Greear <greearb@candelatech.com> [add the number of beacons to the message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-20mac80211: return the RSSI in dBmEmmanuel Grumbach
For the sake of speed of calculation and number accuracy, mac80211 tracks the RSSI in dBm * 16. But it forgot to divide back by 16 when the RSSI is asked by the driver. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-20cfg80211: fix error return code in cfg80211_init()Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-20cfg80211: fix potential connection work crashJohannes Berg
If wpa_supplicant and iw/iwconfig are used together, very rarely the system crashes. It seems to be related to the connection parameters not being set up, but it's not all clear to me how this happens. In any case, checking that the conn pointer exists here is probably a good idea. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211_hwsim: assign CAB queue properly on interface type changeJohannes Berg
When an interface change type, the CAB queue must be reassigned, do this in hwsim to avoid warnings/crashes. Reported-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211: stop queues temporarily for flushingJohannes Berg
Sometimes queues are flushed in the middle of operation, which can lead to driver issues. Stop queues temporarily, while flushing, to avoid transmitting new packets while they are being flushed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211: pass queue bitmap to flush operationJohannes Berg
There are a number of situations in which mac80211 only really needs to flush queues for one virtual interface, and in fact during this frames might be transmitted on other virtual interfaces. Calculate and pass a queue bitmap to the driver so it knows which queues to flush. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211/minstrel_ht: do not sample actively used ratesFelix Fietkau
max_tp_rate2 and max_prob_rate tend to get used occasionally during retransmission, which is more useful for the statistics than probing with individual probe packets. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211/minstrel_ht: avoid useless sampling of high-probability slower ratesFelix Fietkau
Slow rates that have >95% success probability do not need to be monitored continuously. When the channel conditions change rapidly, the slow sampling results are useless anyway. When conditions change slowly, they will be monitored by gradual downgrading of the actively used rates. This patch slightly improves throughput under good conditions. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211/minstrel_ht: improve rate selection stabilityFelix Fietkau
Under load, otherwise stable rates can easily fluctuate because of collisions. In my tests on a clean channel, the success probability of the max throughput rate often stays somewhere between 90% and 100% under load. This can cause some unnecessary switching to lower rates. This patch improves stability by treating success probability values between 90% and 100% the same. In my tests on a 3x3 HT20 link with lots of TCP traffic, it improves the average throughput by a few mbit/s. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211: remove vif debugfs driver callbacksStanislaw Gruszka
This basically reverts commit b207cdb07f3f01ec1adaac62e9d0cc918c60a81a. Now is possible to use drv_{add,remove}_interface() and vif->debugfs_dir to create/remove per interface debugfs files. Remove redundant callbacks. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-18mac80211: move sdata debugfs dir to vifStanislaw Gruszka
There is need create driver own per interface debugfs files. This is currently done by drv_{add,remove}_interface_debugfs() callbacks. But it is possible that after we remove interface from the driver (i.e. on suspend) we call drv_remove_interface_debugfs() function. Fixing this problem will require to add call drv_{add,remove}_interface_debugfs() anytime we create and remove interface in mac80211. So it's better to add debugfs dir dentry to vif structure to allow to create/remove custom debugfs driver files on drv_{add,remove}_interface(). Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-11mac80211: add driver callback for per-interface multicast filterAlexander Bondar
Some devices have multicast filter capability for each individual virtual interface rather than just a global one. Add an interface specific driver callback allowing such drivers to configure this. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-11mac80211: remove a few set but unused variablesJohannes Berg
Found by compiling with W=1. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-11mac80211: batch key free synchronize_net()Johannes Berg
Instead of calling synchronize_net() for every key on an interface or when a station is removed, do it only once for all keys in both of these cases. As a side-effect, removing station keys now always calls synchronize_net() even if there are no keys, which fixes an issue with station removal happening in the driver while the station could still be used for TX. Signed-off-by: Johannes Berg <johannes.berg@intel.com>