summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-john' of ↵John W. Linville2014-01-1339-866/+1047
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * mac80211_hwsim: restore regulatory testing functionalityJohannes Berg2014-01-102-3/+222
| | | | | | | | | | | | | | | | Restore the original regulatory testing functionality and also make it more flexible by allowing the parameters to be specified when creating a dynamic radio. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: allow creating/destroying radios on the flyJohannes Berg2014-01-102-6/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new commands to the hwsim generic netlink family to allow creating and destroying radios on the fly. The number of channels a radio supports can be specified when it's created, if it isn't the module parameter will be used as default. This should be extended in the future to allow other parameters to be specified, e.g. * list of channels * interface combinations, particularly P2P_DEVICE support * regtest * and pretty much all other hardware capabilities Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: register netlink even with multi-channelJohannes Berg2014-01-101-8/+16
| | | | | | | | | | | | | | | | | | Reject wmediumd registrations when any devices have multi-channel capability, but register the generic netlink family unconditionally to make it possible to add new commands that shouldn't depend on the number of (default) channels. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: verify wmediumd socketJohannes Berg2014-01-101-0/+9
| | | | | | | | | | | | | | | | There can't be two wmediumd instances controlling hwsim, so reject registration from a second one and verify in the commands that it's the correct instance calling. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: shuffle code to prepare for dynamic radiosJohannes Berg2014-01-101-413/+413
| | | | | | | | | | | | | | This will make the next patch, adding support for netlink, smaller and more readable. The code is not modified here. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: minor netlink cleanupsJohannes Berg2014-01-101-41/+23
| | | | | | | | | | | | | | Use u8 pointer instead of the struct mac_address and do some other small cleanups. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: assign index from separate counterJohannes Berg2014-01-101-2/+8
| | | | | | | | | | | | | | To later allow dynamic registration, assign the index for the struct device and MAC address from a new free-running counter. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: minimize rctbl module parameter usageJohannes Berg2014-01-101-3/+3
| | | | | | | | | | | | | | Check the flag that the module parameter sets instead, so later radios can use different parameters. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: refactor radio cleanupJohannes Berg2014-01-101-14/+18
| | | | | | | | | | | | | | Refactor the radio cleanup into a new function to later allow deleting a single radio from the list. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: refactor radio registrationJohannes Berg2014-01-101-230/+225
| | | | | | | | | | | | | | | | | | In order to support dynamic radio registration in the future, refactor the actual registration into a new function with only minor cleanups. Since it had to change anyway, also clean up the init error paths. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: remove regtest for nowJohannes Berg2014-01-101-220/+0
| | | | | | | | | | | | | | | | The regtest thing worked based on the radio loop, but with more dynamic radio registration that loop won't really exist as is. We can add it back later with proper dynamic code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: prepare for different channel supportJohannes Berg2014-01-101-31/+36
| | | | | | | | | | | | | | | | | | Prepare the code to support, in theory, different devices with a different number of channels supported. Right now this doesn't really change anything, but will allow for dynamic device registration in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: clean up netlink exit codeJohannes Berg2014-01-101-7/+1
| | | | | | | | | | | | | | There's no need to print a message, and genl_unregister_family() can't really fail so remove the error message there as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * ieee80211: add definition for SMS4 key lenAvinash Patil2014-01-101-0/+1
| | | | | | | | | | | | | | | | | | Add SMS4 key length definition to ieee80211_key_len enum. It's used by WAPI. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: handle MMPDUs at EOSP correctlyJohannes Berg2014-01-102-13/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | If a uAPSD service period ends with an MMPDU, we currently just send that MMPDU, but it obviously won't get the EOSP bit set as it doesn't have a QoS header. This contradicts the standard, so add a QoS-nulldata frame after the MMPDU to properly terminate the service period with a frame that has EOSP set. Also fix a bug wrt. the TID for the MMPDU, it shouldn't be set to 0 unconditionally but use the actual TID that was assigned. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: reset TX info flags when frame will be reprocessedJohannes Berg2014-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | The temporary TX info flags need to be cleared if the frame will be processed through the TX handlers again, otherwise it can get messed up. This fixes a bug that happened when an aggregation session was stopped while the station was sleeping - some frames might get transmitted marked as aggregation erroneously without this fix. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: release multiple ACs in uAPSD, fix more-data bugJohannes Berg2014-01-101-42/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a response for PS-Poll or a uAPSD trigger frame is sent, the more-data bit should be set according to 802.11-2012 11.2.1.5 h), meaning that it should indicate more data on the relevant ACs (delivery-enabled or nondelivery-enabled for uAPSD or PS-Poll.) In, for example, the following scenario: * 1 frame on VO queue (either in driver or in mac80211) * at least 1 frame on VI queue (in the driver) * both VO/VI are delivery-enabled * uAPSD trigger frame received The more-data flag to the driver would not be set, even though it should be. While fixing this, I noticed that we should really release frames from multiple ACs where there's data buffered in the driver for the corresponding TIDs. To address all this, restructure the code a bit to consider all ACs if we only release driver frames or only buffered frames. This also addresses the more-data bug described above as now the TIDs will all be marked as released, so the driver will have to check the number of frames. While at it, clarify some code and comments and remove the found variable, replacing it with the appropriate sw/hw release check. Reported-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: fix PS-Poll driver release TIDJohannes Berg2014-01-101-1/+13
| | | | | | | | | | | | | | | | | | | | Using ffs() for the PS-Poll release TID is wrong, it will cause frames to be released in order 0 1 2 3 4 5 6 7 instead of the correct 7 6 5 4 3 0 2 1. Fix this by adding a new function that implements "highest priority TID" properly. Reported-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * ieee80211: add definition for TDLS wide band extended capabilityAvinash Patil2014-01-101-0/+1
| | | | | | | | | | | | | | | | | | Seventh bit of 8th byte of extended capabilities specifies wide bandwidth support for TDLS links. Add this definition to ieee80211. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: add sanity check for retry limit in wext-compatUjjal Roy2014-01-091-1/+1
| | | | | | | | | | | | | | | | | | Block setting the wrong values through iwconfig retry command. Add sanity checking before sending the retry limit to the driver. Signed-off-by: Ujjal Roy <royujjal@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: Add a function to get the number of supported channelsIlan Peer2014-01-096-32/+29
| | | | | | | | | | | | | | | | | | Add a utility function to get the number of channels supported by the device, and update the places in the code that need this data. Signed-off-by: Ilan Peer <ilan.peer@intel.com> [replace another occurrence in libertas, fix kernel-doc, fix bugs] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: remove channel_change_timeJohannes Berg2014-01-0717-31/+0
| | | | | | | | | | | | | | This value is no longer used by mac80211, and practically no driver ever set it to a correct value anyway, so remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: allow to set smps mode to OFF in AP modeEmmanuel Grumbach2014-01-071-3/+2
| | | | | | | | | | | | | | | | | | | | In managed mode, we should not ask for OFF mode because the power settings may still require DYNAMIC. In AP mode, this should be allowed since the default settings is OFF and AUTOMATIC is not allowed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: clean up prepare_for_handlers() return valueJohannes Berg2014-01-071-18/+18
| | | | | | | | | | | | | | Using an int with 0/1 is not very common, make the function return a bool instead with the same values (false/true). Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: simplify code in ieee80211_prepare_and_rx_handleEmmanuel Grumbach2014-01-071-3/+1
| | | | | | | | | | | | | | | | No need to assign the return value of prepare_for_handlers to a variable if the only usage is to test it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: clean up garbage in commentEmmanuel Grumbach2014-01-071-1/+1
| | | | | | | | | | | | | | Not clear how this landed here. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211_hwsim: fix a print messageJohannes Berg2014-01-061-1/+1
| | | | | | | | | | | | The prefix should be mac80211_hwsim, not mac_80211_hwsim. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: sync dtim_count to TSFThomas Pedersen2014-01-065-0/+46
| | | | | | | | | | | | | | | | On starting a mesh or AP BSS, the interface dtim_count countdown should match that of the driver TSF. Signed-off-by: Thomas Pedersen <twpedersen@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: fix wext-compat for getting retry valueUjjal Roy2014-01-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While getting the retry limit, wext-compat returns the value without updating the flag for retry->flags is 0. Also in this case, it updates long retry flag when short and long retry value are unequal. So, iwconfig never showing "Retry short limit" and showing "Retry long limit" when both values are unequal. Updated the flags and corrected the condition properly. Signed-off-by: Ujjal Roy <royujjal@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: enable WME for peer mesh STAChun-Yeow Yeoh2014-01-061-0/+1
| | | | | | | | | | | | | | | | Enable the WME for peer mesh STA so that the driver, such as wcn36xx, will pick this up and enabling it in HW. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: fix memory leak in register_hw() error pathJohannes Berg2014-01-061-11/+11
| | | | | | | | | | | | | | | | | | Move the internal scan request allocation below the last sanity check in ieee80211_register_hw() to avoid leaking memory if the sanity check actually triggers. Reported-by: ZHAO Gang <gamerh2o@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: handle station TX latency allocation errorsJohannes Berg2014-01-061-30/+40
| | | | | | | | | | | | | | | | | | | | | | | | When the station's TX latency data structures need to be allocated, handle failures properly and also free all the structures if there are any other problems. Move the allocation code up so that allocation failures don't trigger rate control algorithm calls. Reported-by: ZHAO Gang <gamerh2o@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: clean up netdev debugfs macros a bitJohannes Berg2014-01-061-27/+33
| | | | | | | | | | | | | | | | Clean up the file macros a bit and use that to remove the unnecessary format function for the tkip MIC test file that really is write-only. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * nl80211: move vendor/testmode event skb functions out of ifdefJohannes Berg2014-01-061-49/+49
| | | | | | | | | | | | | | | | The vendor/testmode event skb functions are needed outside the ifdef for vendor-specific events, so move them out. Reported-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * mac80211: add tracing for ieee80211_sta_set_bufferedJohannes Berg2014-01-062-0/+29
| | | | | | | | | | | | | | | | This is useful for debugging issues with drivers using this function (erroneously), so add tracing for the API call. Change-Id: Ice9d7eabb8fecbac188f0a741920d3488de700ec Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211/mac80211: correct qos-map lockingJohannes Berg2013-12-302-1/+3
| | | | | | | | | | | | | | | | Since the RTNL can't always be held, use wdev/sdata locking for the qos-map dereference in mac80211. This requires cfg80211 to consistently lock it, which it was missing in one place. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge branch 'for-linville' of git://github.com/kvalo/athJohn W. Linville2014-01-1311-23/+642
|\ \
| * | ath10k: add set_bitrate_mask callbackJanusz Dziedzic2014-01-103-0/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add set_bitrate_mask callback. Currently ath10k HW is limited to handle only single fixed rate setting or limit number of used spatial streams. Example: iw wlanX set bitrates legacy-5 ht-mcs-5 vht-mcs-5 2:9 will setup VHT, nss=2, mcs=9 iw wlanX set bitrates legacy-5 18 ht-mcs-5 vht-mcs-5 will setup legacy, 18Mbps iw wlanX set bitrates legacy-5 ht-mcs-5 3 vht-mcs-5 will setup HT, nss=1, mcs=3 iw wlanX set bitrate legacy-5 ht-mcs-5 vht-mcs-5 1:0-9 will setup nss=1 iw wlanX set bitrate legacy-5 ht-mcs-5 vht-mcs-5 1:0-9 2:0-9 will setup nss=2 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | ath10k: add debugfs file to control firmware dbglogKalle Valo2014-01-104-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firmware dbglogs can be now enabled through fw_dbglog file. To enable all possible log messages run: echo 0xffffffff > /sys/kernel/debug/ieee80211/phy0/ath10k/fw_dbglog And to put back firmare defaults use 0x0: echo 0x0 > /sys/kernel/debug/ieee80211/phy0/ath10k/fw_dbglog Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | ath10k: add trace event for WMI_DEBUG_MESG_EVENTIDKalle Valo2014-01-102-2/+28
| | | | | | | | | | | | | | | | | | Send firmware WMI debug logs to user space for further processing. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | ath10k: handle WMI debug print eventsKalle Valo2014-01-101-2/+31
| | | | | | | | | | | | | | | | | | | | | Firmware can send simple ascii strings as debug messages using WMI_DEBUG_PRINT_EVENTID, print those with ATH10K_DBG_WMI log level. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | ath10k: track number of existing peersBartosz Markowski2014-01-103-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To not exceed number of allowed clients (AP mode), make sure to check how many of them are already on the peers list. 10.X firmware support up to 127 peers, non-AP centric firmwares 16. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | ath10k: disable STA kickout in FWMarek Puzyniak2014-01-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently ath10k is not using STA KICKOUT firmware functionality. In order to avoid unwanted WMI_PEER_STA_KICKOUT_EVENT event this functionality should be disabled when not used. Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | ath10k: add DFS_CERTIFIED optionJanusz Dziedzic2014-01-101-0/+7
| | | | | | | | | | | | | | | | | | | | | Add Kconfig option that allow DFS functionality. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | Merge remote-tracking branch 'wireless-next/master' into ath-nextKalle Valo2013-12-23269-5859/+7725
| |\ \
| * | | ath10k: introduce NO_P2P fw feature flagBartosz Markowski2013-12-162-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not each ath10k FW track supports P2P (10.X for instance does not) This new firmware feature flag allows to turn off P2P interface type. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | | ath10k: split the if_limits and if_combBartosz Markowski2013-12-161-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the interface limits and inteface combination, to reflect the 10.X capabilites (no P2P, no STA and 8 VAP). kvalo: reverse order of ATH10K_FW_FEATURE_WMI_10X test, fix checkpath warnings Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | | ath10k: fix band reporting for mgmt CCK frames on 5GHzMichal Kazior2013-12-161-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although CCK modulation isn't expected for 11a if it happened it made ath10k report wrong band (2GHz) for a mgmt frame that were actually received on 5Ghz band. Frequency would also decoded incorrectly too. In case of 5GHz-only devices this triggered mac80211 WARN_ON because there was no according sband pointer to be found. The patch should fix delivery of such frames by using different means to acquire band parameter. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * | | ath10k: handle TKIP MIC error correctlyJanusz Dziedzic2013-12-163-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should check MIC error flag base on rx_attention, to have consistent status of MIC failure and FCS error. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>