summaryrefslogtreecommitdiffstats
path: root/drivers/net (follow)
Commit message (Collapse)AuthorAgeFilesLines
* p54: clamp properly instead of just truncatingDan Carpenter2014-01-131-1/+1
| | | | | | | | | The call to clamp_t() first truncates the variable signed 8 bit and as a result, the actual clamp is a no-op. Fixes: 0d78156eef1d ('p54: improve site survey') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: delete useless variableJulia Lawall2014-01-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Delete a variable that is at most only assigned to a constant, but never used otherwise. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ type T; identifier i; constant c; @@ -T i; <... when != i -i = c; ...> // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Process GTT interruptsSujith Manoharan2014-01-133-4/+35
| | | | | | | | | | | | | | | | | Global Transmission Timeout interrupts are generated by the HW when transmission of a frame fails - this is done based on the threshold programmed in the AR_GTXTO register. Currently, even though the interrupt is enabled for all chips, it is not handled in the driver. This patch handles GTT events for AR9003 and above chips, checking if the MAC/BB has hung after successive GTT interrupts crosses a threshold (5). This can be enabled for the older chips in the AR9002 family once appropriate HW hang checks are implemented for them. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove debug print in ISRSujith Manoharan2014-01-131-2/+0
| | | | | | | | | There is no need to do this and we can avoid an unused variable warning when CONFIG_ATH9K_WOW is not selected. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add a debugfs file "node_recv"Sujith Manoharan2014-01-135-7/+203
| | | | | | | This would be useful when debugging RX performance issues. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Use a separate debugfs file for PHY errorsSujith Manoharan2014-01-131-43/+74
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Show only active TIDs in node_aggrSujith Manoharan2014-01-131-5/+13
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add an option for station statisticsSujith Manoharan2014-01-135-81/+108
| | | | | | | Also, rename node_stat to node_aggr. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43legacy: Fix unload oops if firmware is not availableLarry Finger2014-01-131-0/+1
| | | | | | | | | | | The asyncronous firmware load uses a completion struct to hold firmware processing until the user-space routines are up and running. There is. however, a problem in that the waiter is nevered canceled during teardown. As a result, unloading the driver when firmware is not available causes an oops. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix unload oops if firmware is not availableLarry Finger2014-01-132-7/+7
| | | | | | | | | | | | | | | | The asyncronous firmware load uses a completion struct to hold firmware processing until the user-space routines are up and running. There is. however, a problem in that the waiter is nevered canceled during teardown. As a result, unloading the driver when firmware is not available causes an oops. To be able to access the completion structure at teardown, it had to be moved into the b43_wldev structure. This patch also fixes a typo in a comment. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* b43: Fix lockdep splatLarry Finger2014-01-131-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://bugzilla.kernel.org/show_bug.cgi?id=67561, a locking dependency is reported when b43 is used with hostapd, and rfkill is used to kill the radio output. The lockdep splat (in part) is as follows: ====================================================== [ INFO: possible circular locking dependency detected ] 3.12.0 #1 Not tainted ------------------------------------------------------- rfkill/10040 is trying to acquire lock: (rtnl_mutex){+.+.+.}, at: [<ffffffff8146f282>] rtnl_lock+0x12/0x20 but task is already holding lock: (rfkill_global_mutex){+.+.+.}, at: [<ffffffffa04832ca>] rfkill_fop_write+0x6a/0x170 [rfkill] --snip-- Chain exists of: rtnl_mutex --> misc_mtx --> rfkill_global_mutex The fix is to move the initialization of the hardware random number generator outside the code range covered by the rtnl_mutex. Reported-by: yury <urykhy@gmail.com> Tested-by: yury <urykhy@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add missing endian conversion for fw_tsfAmitkumar Karwar2014-01-131-2/+2
| | | | | | | | | | It is u64 data received from firmware. Little endian to cpu conversion is required here. Cc: <stable@vger.kernel.org> # 3.5+ Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl12xx: fix tx power settingAlex Gal2014-01-131-0/+10
| | | | | | | | The driver ignores BSS_CHANGED_TXPOWER changes. Fix this by calling ACX_TX_POWER when appropriate. Signed-off-by: Alex Gal <a.gal@motsai.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add USB8897 supportYogesh Ashok Powar2014-01-133-19/+51
| | | | | | | | | | | Adding new device IDs and assigning generic function/variable names instead of using device-id specific names. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rtlwifi: rtl8192cu: Add new device IDLarry Finger2014-01-131-0/+1
| | | | | | | | Reported-by: Jan Prinsloo <janroot@gmail.com> Tested-by: Jan Prinsloo <janroot@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: make regulatory_hint() remove REGULATORY_CUSTOM_REGLuis R. Rodriguez2014-01-131-2/+0
| | | | | | | | | | | | | The REGULATORY_CUSTOM_REG can be used during early init with the goal of overriding the wiphy's default regulatory settings in case the alpha2 of the device is not known. In the case that the alpha2 becomes known lets avoid having drivers having to clear the REGULATORY_CUSTOM_REG flag by doing it for them when regulatory_hint() is used. Cc: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath: fix warning on usage of REGULATORY_CUSTOM_REGLuis R. Rodriguez2014-01-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ath wants to first apply the custom regd and only later will it revert to not using it if an alpha2 regulatory domain is found. Since the wireless core now enforces usage of the REGULATORY_CUSTOM_REG strictly when wiphy_apply_custom_regulatory() is used this makes ath adhere to the expected behaviour but also updates the wiphy after its done with the custom usage. This fixes this warning: [ 5.488733] ath: phy0: ASPM enabled: 0x43 [ 5.488735] ath: EEPROM regdomain: 0x0 [ 5.488736] ath: EEPROM indicates default country code should be used [ 5.488736] ath: doing EEPROM country->regdmn map search [ 5.488737] ath: country maps to regdmn code: 0x3a [ 5.488737] ath: Country alpha2 being used: US [ 5.488738] ath: Regpair used: 0x3a [ 5.488738] ------------[ cut here ]------------ [ 5.488745] WARNING: CPU: 0 PID: 161 at /home/sujith/dev/wireless-testing/net/wireless/reg.c:1361 wiphy_apply_custom_regulatory+0x17a/0x1b0 [cfg80211]() [ 5.488746] wiphy should have REGULATORY_CUSTOM_REG The wireless core can *later* lift this flag for us for when using the regulatory_hint() to make this fix more generic. Reported-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-john' of ↵John W. Linville2014-01-1317-634/+663
|\ | | | | | | 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>
| * cfg80211: Add a function to get the number of supported channelsIlan Peer2014-01-091-6/+1
| | | | | | | | | | | | | | | | | | 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-0715-27/+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_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>
* | 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-23193-5185/+5886
| |\ \
| * | | 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>
| * | | ath10k: fix WEP Shared authenticationMichal Kazior2013-12-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Frames received from FW were treated incorrectly. This led to stations being unable to associate to WEP Shared ath10k AP. This was indicated by a bizarre hostapd message: Unsupported authentication algorithm (36088) Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | | | ath9k: Disable cross-band FCCSujith Manoharan2014-01-091-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fast Channel Change across bands was enabled for AR9462 recently, but this is causing baseband issues. Disable it until this feature is tested well. Also, remove the feature bit for AR9565 since it is a single-band card and doesn't support this feature. Cc: stable@vger.kernel.org Reported-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | ath9k: Use correct channel for RX packetsSujith Manoharan2014-01-091-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accessing the current channel definition in mac80211 when processing RX packets is problematic because it could have been updated when a scan is issued. Since a channel change involves flushing the existing packets in the RX queue before a chip-reset is done, they would be processed using the wrong band/channel information. To avoid this, use the current channel information maintained in the driver. Cc: stable@vger.kernel.org Reported-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>