summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: handle extended channel switch announcementJohannes Berg2013-04-162-4/+43
| | | | | | | | | Handle the (public) extended channel switch announcement action frames. Parts of the data in these frames isn't really in IEs, but put it into the elems struct anyway to simplify the handling. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: support secondary channel offset in CSAJohannes Berg2013-04-164-20/+70
| | | | | | | | | | | | | | | Add support for the secondary channel offset IE in channel switch announcements. This is necessary for proper handling of CSA on HT access points. For this to work it is also necessary to convert everything here to use chandef structs instead of just channels. The driver updates aren't really correct though. In particular, the TI wl18xx driver update can't possibly be right since it just ignores the new channel width for lack of firmware API. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: support extended channel switchJohannes Berg2013-04-163-26/+59
| | | | | | | | | Support extended channel switch when the operating class is one of the global operating classes as defined in Annex E of 802.11-2012. If it isn't, disconnect from the AP instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: add ieee80211_operating_class_to_bandJohannes Berg2013-04-161-0/+20
| | | | | | | | This function converts a (global only!) operating class to an internal band identifier. This will be needed for extended channel switch support. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: unify CSA action frame/beacon processingJohannes Berg2013-04-163-36/+43
| | | | | | | | | CSA action frame content should be processed as variable IEs rather than fixed to make it extensible. Unify the code and process them just like CSA in beacons to make it easier to extend for HT/VHT. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: use second center_freq segment only in 80+80Johannes Berg2013-04-161-6/+4
| | | | | | | | The field is otherwise reserved, so we shouldn't read and reject it, though any sane system will probably have to set it to 0 anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* wireless: regulatory: fix channel disabling race conditionJohannes Berg2013-04-161-1/+1
| | | | | | | | | | | | | | | | | When a full scan 2.4 and 5 GHz scan is scheduled, but then the 2.4 GHz part of the scan disables a 5.2 GHz channel due to, e.g. receiving country or frequency information, that 5.2 GHz channel might already be in the list of channels to scan next. Then, when the driver checks if it should do a passive scan, that will return false and attempt an active scan. This is not only wrong but can also lead to the iwlwifi device firmware crashing since it checks regulatory as well. Fix this by not setting the channel flags to just disabled but rather OR'ing in the disabled flag. That way, even if the race happens, the channel will be scanned passively which is still (mostly) correct. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: always pick a basic rate to tx RTS/CTS for pre-HT ratesKarl Beldan2013-04-111-4/+7
| | | | | | | | | | | | | | | | | When the 1st rate control entry is a pre-HT rate we want to set rts_cts_rate_idx "as the fastest basic rate that is not faster than the data rate"(code comments). But in case some bss allowed rate indexes are lower than the lowest bss basic rate, if the rate control selects a rate among the formers for its 1st rate control entry, rts_cts_rate_idx remains 0 and is not a basic rate index. This commit sets rts_cts_rate_idx to the lowest bss basic rate index in this situation. Note that the code assumes that lowest indexes == lowest bitrates. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: fix ieee80211_queue_stopped()Thomas Pedersen2013-04-111-1/+2
| | | | | | | | | Johannes Berg notes mac80211 drivers which use ieee80211_queue_stopped() really only want to know if they previously requested a queue stop. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: provide SSID in IBSS modeMarek Puzyniak2013-04-101-0/+4
| | | | | | | | | | | 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>
* mac80211: always advertise STBC/MCSes even if no AP supportJohannes Berg2013-04-101-32/+0
| | | | | | | | | | 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>
* mac80211: clear SSID when stopping APMarek Puzyniak2013-04-101-0/+1
| | | | | | | | | 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>
* mac80211: fix recalc_radar hwconf sync problemSimon Wunderlich2013-04-101-10/+33
| | | | | | | | | | | | | | 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>
* mac80211: stringify another plink stateThomas Pedersen2013-04-101-2/+2
| | | | | | | | 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>
* mac80211: unset FC retry bit in mesh fwding pathThomas Pedersen2013-04-101-0/+1
| | | | | | | | 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>
* mac80211: make ieee802_11_parse_elems an inlineJohannes Berg2013-04-082-8/+6
| | | | | | This (slightly) reduces the code size. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: don't start new netdev queues if driver stoppedJohannes Berg2013-04-081-2/+22
| | | | | | | | | | 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>
* mac80211: replace some dead code by a warningJohannes Berg2013-04-081-1/+2
| | | | | | | | 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>
* mac80211: don't fiddle with netdev queues in MLME codeJohannes Berg2013-04-081-24/+2
| | | | | | | | | | | | | | | 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>
* mac80211: disable uAPSD if all ACs are under ACMAlexander Bondar2013-04-081-1/+2
| | | | | | | | | | | 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>
* mac80211: fix do_stop handling while suspendedJohannes Berg2013-04-081-25/+49
| | | | | | | | | | | | | | | | | | 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>
* mac80211: destroy virtual monitor interface across suspendJohannes Berg2013-04-084-6/+11
| | | | | | | | | 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>
* mac80211: purge remain-on-channel items when suspendingJohannes Berg2013-04-084-5/+8
| | | | | | | | | | 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>
* mac80211: remove outdated comment referring to master interfaceJohannes Berg2013-04-081-6/+1
| | | | | | | The code now explicitly calls ieee80211_configure_filter() anyway, so nothing needs to be explained. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: return new mpath from mesh_path_add()Bob Copeland2013-04-084-51/+42
| | | | | | | | | | | | 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>
* mac80211: fix the PREP mesh hwmp debug messageChun-Yeow Yeoh2013-04-081-2/+2
| | | | | | | | | | 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>
* mac80211: parse Timeout Interval Element using a structJohannes Berg2013-04-083-7/+8
| | | | | | | | 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>
* mac80211: check ERP info IE length in parserJohannes Berg2013-04-084-7/+7
| | | | | | | 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>
* mac80211: check DSSS params IE length in parserJohannes Berg2013-04-085-6/+7
| | | | | | | 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>
* mac80211: remove unused IE pointers from parserJohannes Berg2013-04-082-28/+0
| | | | | | | There's no need to parse IEs that aren't used so just remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: remove ancient reference to master interfaceJohannes Berg2013-04-081-1/+1
| | | | | | | 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>
* mac80211: be more careful about sending beacon-loss-eventsBen Greear2013-04-081-3/+5
| | | | | | | | 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>
* mac80211: add beacon stats to debugfsBen Greear2013-04-082-0/+13
| | | | | | | 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>
* mac80211: let drivers not supporting channel contexts use VHTKarl Beldan2013-04-081-13/+1
| | | | | | | | 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>
* mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chanKarl Beldan2013-03-259-71/+83
| | | | | | | | | | 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>
* mac80211: allow drivers to set default uAPSD parametersAlexander Bondar2013-03-252-2/+4
| | | | | | | | | | | | | | | | | | 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>
* mac80211: ibss: use beacon_data struct for beacon and probe responseJohannes Berg2013-03-253-71/+70
| | | | | | | | 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>
* mac80211: ibss: disable beaconing before freeing beaconJohannes Berg2013-03-251-9/+12
| | | | | | | | 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>
* mac80211: add P2P NoA settingsJanusz Dziedzic2013-03-224-30/+46
| | | | | | | | 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>
* mac80211: use ieee80211_p2p_noa_attr structureJanusz Dziedzic2013-03-221-11/+15
| | | | | | | | 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>
* mac80211: make beacon-loss-count configurableBen Greear2013-03-221-3/+7
| | | | | | | | | | | | 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>
* mac80211: return the RSSI in dBmEmmanuel Grumbach2013-03-201-1/+1
| | | | | | | | | 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>
* cfg80211: fix error return code in cfg80211_init()Wei Yongjun2013-03-201-1/+3
| | | | | | | | 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>
* cfg80211: fix potential connection work crashJohannes Berg2013-03-201-1/+1
| | | | | | | | | | 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>
* mac80211: stop queues temporarily for flushingJohannes Berg2013-03-187-12/+31
| | | | | | | | | | 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>
* mac80211: pass queue bitmap to flush operationJohannes Berg2013-03-189-17/+48
| | | | | | | | | | 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>
* mac80211/minstrel_ht: do not sample actively used ratesFelix Fietkau2013-03-181-2/+5
| | | | | | | | | 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>
* mac80211/minstrel_ht: avoid useless sampling of high-probability slower ratesFelix Fietkau2013-03-181-3/+3
| | | | | | | | | | | 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>
* mac80211/minstrel_ht: improve rate selection stabilityFelix Fietkau2013-03-181-1/+10
| | | | | | | | | | | | | | 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>
* mac80211: remove vif debugfs driver callbacksStanislaw Gruszka2013-03-182-41/+0
| | | | | | | | | | | 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>
OpenPOWER on IntegriCloud