summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2013-10-18iwlwifi: mvm: fix operator precedenceDavid Spinadel
Integers need to be multiplied before division. Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: fix fw_rx_stats debugfs entryLuciano Coelho
The fw_rx_stats entry in debugfs was getting truncated because the internal buffer used to hold the string was too short. The calculation of the needed buffer size was rather bogus. Simplify the calculation by multiplying the number of entries in the entire structure by the size of each data line and adding the size of the header lines. Additionally, add the mac_id value, which was missing. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: BT Coex - enable Tx power based on BT statusEmmanuel Grumbach
The activity grading indication from the firmware should not be used in this case, but the bt_status in the firwmare notification. Fix that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: BT Coex - always set mandatory fieldsEmmanuel Grumbach
The firmware always expects the Coex Mode to be set. Moreover, the firmware expects bit 0 is the valid bits to be set all the times. I misunderstood the API and didn't set these bits when commands are sent to update the paramters of the Coex. As a result, the firmware understood that the BT Coex was disabled (Coex mode = 0) and ignored all the updates (valid bit 0 clear). Fix that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-18iwlwifi: mvm: NVM - increase max section sizeIdan Kahlon
Section size limitation to 6000 is incorrect. NVM file need to support bigger sections in order to support PAPD tables. Signed-off-by: Idan Kahlon <idanx.kahlon@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Maor Perez <maorx.perez@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-16ath10k: add might_sleep() to ath10k_wmi_cmd_send()Kalle Valo
ath10k_wmi_cmd_send() will now sleep if there are no credits available. To make it easier to catch callers in atomic context add might_sleep() to the function. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: fix ath10k_bss_assoc() to not sleep in atomic contextKalle Valo
ath10k_bss_assoc() was calling ath10k_peer_assoc(), which can sleep, under atomic rcu_read_lock() and causing scheduing while atomic errors. Workaround that by delaying the call to ath10k_wmi_peer_assoc(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: remove unnecessary checksMichal Kazior
mac80211 interface iteration functions that were used originally iterated over interfaces that weren't re-added to the driver during recovery. Since internal vif list is now used it's safe to remove the safe-guard as internal vif list is based on add/remove_interface function which guarantees that vdev is created in FW before it is iterated over. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: fix scheduling while atomic config bugMichal Kazior
Recent HTC/WMI changes introduced the bug. ath10k was using _atomic iteration function with sleepable functions. mac80211 provides another iteration function but it cannot be safely called in hw_config() callback due to local->iflist_mtx being possibly acquired already. The patch uses internal vif list for iteration purposes and removes/refactors no longer necessary _iter functions. Reported-By: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: track vif list internallyMichal Kazior
mac80211 interface interations functions have peculiar locking issues. This patch introduces internal (to ath10k) vif list that will be used for vif iteration purposes. kvalo: remove extra INIT_LIST_HEAD() Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: fix add_interface failure handlingMichal Kazior
If something failed along add_interface() setup it was possible to leak a vdev id, vdev and peer. This could end up with leaked FW state or FW crash (assuming add_interface() failure wasn't a result of a crash). kvalo: rebased, whitespace fixes Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: use workqueue to set WEP TX keyMichal Kazior
Recent WMI/HTC changes made it possible for WMI commands to sleep (if there's not enough HTC TX credits to submit a command). TX path is in an atomic context so calling WMI commands in it is wrong. This simply moves WEP key index update to a worker and fixes the 'scheduling while atomic' bug. This still leaves multiple WEP key handling laggy, i.e. some frames may be TXed with an old/different key (although recipient should still be able to RX them). kvalo: changed the title Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: return better errno for unsupported pdev paramsBartosz Markowski
Return -EOPNOTSUPP if given parameter is not supported by firmware. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: rename WMI_CMD_UNDEFINEDBartosz Markowski
Rename WMI_CMD_UNDEFINED to WMI_CMD_UNSUPPORTED. This is more accurate here. Also return -EOPNOTSUPP instead of -EINVAL in wmi_cmd_send(). Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-16ath10k: do not warn about unsupported vdev paramBartosz Markowski
10.X firmware does not support WMI_VDEV_PARAM_TX_ENCAP_TYPE. It's a known limitation and we should not warn about this. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-10-14rt2x00: rt2800lib: remove duplicate rf_vals for RF3053Kevin Lo
lready have rf_vals_3x with same values. Hence rf_vals_3053 is removed in this patch. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt2800lib: fix RF registers for RT5390/RT5392Kevin Lo
Update rf registers to use the same values that the MediaTek/Ralink reference driver DPO_RT5572_LinuxSTA_2.6.1.3_20121022 uses. References: RF5390RegTable in chips/rt5390.c RF5392RegTable in chips/rt5390.c Tested on TP-Link TL-WN727N and D-Link DWA-140 Rev.b3 usb wifi dongles. Signed-off-by: Kevin Lo <kevlo@kevlo.org> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14mwifiex: use alloc_workqueue() functionAmitkumar Karwar
It replaces deprecated create_workqueue(). 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>
2013-10-14ath9k_hw: remove references to hw->confFelix Fietkau
Accessing it to get the current operating channel is racy and in the way of further channel handling related changes Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: make ath9k_uses_beacons staticFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: remove sc->config.cabqReadyTimeFelix Fietkau
It is not exposed as a configuration option anyway Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: move channel change code to ath_set_channelFelix Fietkau
Preparation for adding the scanning state machine to ath9k Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: make ath9k_cmn_update_ichannel staticFelix Fietkau
Rework its wrapper function to make it more generic, using it as a replacement for previous calls to ath9k_cmn_update_ichannel. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: simplify channel flagsFelix Fietkau
There was some duplication between channelFlags and chanmode, as well as a lot of redundant checks based on the combinations of flags. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: remove IS_CHAN_OFDM()Felix Fietkau
The hardware is always configured with OFDM support enabled Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: remove IS_CHAN_B()Felix Fietkau
Hardware 802.11b-only mode isn't supported by the driver (the device is configured for 802.11n/g instead). Simplify the code by removing checks for it. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k_hw: remove direct accesses to channel mode flagsFelix Fietkau
Use wrappers where available. Simplifies code and helps with further improvements to the channel data structure Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14ath9k: use a separate data structure for rx buffersFelix Fietkau
There's no shared code for handling both rx and tx buffers, and tx buffers require a lot more metadata than rx buffers. Using a separate data structure for rx reduces memory usage and improves cache footprint. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14wcn36xx: fix coccinelle warningsFengguang Wu
drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 106 /c/kernel-tests/src/i386/drivers/net/wireless/ath/wcn36xx/debug.c:27:11-31: WARNING opportunity for simple_open, see also structure on line 148 This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. Generated by: coccinelle/api/simple_open.cocci CC: Eugene Krasnikov <k.eugene.e@gmail.com> CC: John W. Linville <linville@tuxdriver.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt73usb: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Compile tested only. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt61pci: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Compile tested only. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt2800lib: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: rt2x00lib: use rt2x00_has_cap_* helpersGabor Juhos
Use the appropriate helper functions instead of directly accessing the rt2x00dev->cap_flags field to check device capability flags. This improves readability of the code a bit. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: add rt2x00_has_cap_* helpersGabor Juhos
The rt2x00 code directly accesses the 'cap_flags' field of 'struct rt2x00_dev' when checking presence of a given capability flag. The direct access needs long expressions which lowers readability of the code. Add a few helper functions which can be used to test device capabilities without directly accessing the cap_flags filed. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-14rt2x00: cleanup indentation in rt2800.hGabor Juhos
Adjust whitespaces to move badly aligned constants to the right column. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-10-11iwlwifi: support Signed firmware image and Dual CPUsEran Harary
Support Signed firmware based on code signing system (CSS) protocol and dual CPUs download, the code recognize if there are more than one CPU and if we need to operate the signed protocol according to the ucode binary image Signed-off-by: Eran Harary <eran.harary@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: add IBSS supportJohannes Berg
At the firmware level, IBSS support has similar programming requirements as AP/GO support, so use the same functions with just small differences. With IBSS only a single virtual interface can be used, so no changes in the advertised interface combinations are needed. For now, don't use hardware crypto for the GTKs in IBSS mode, the firmware should support it though. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: Support 7265 devicesEran Harary
7265 is a very similar device to 7260, so just add the definitions based on 7260 for it. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: BT Coex - update integration with rate controlEmmanuel Grumbach
Remove code that is not needed and always allow MIMO when in tight mode. In loose mode, we should avoid MIMO since BT can use the other antenna to Rx while we Tx. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: BT Coex - remove duplicate code in rate controlEmmanuel Grumbach
The code limiting the AMPDU length due to BT traffic was duplicated. Remove the redundant code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: BT Coex - start AMPDU even when BT is activeEmmanuel Grumbach
Tests have shown that we should start AMPDU even when BT is active. So remove that constraint. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: BT Coex - tune SMPS parametersEmmanuel Grumbach
Tests have shown that we should go SMSP_STATIC when BT traffic is high, and stay in dynamic if BT traffic is low. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: BT Coex - track bandwidth changes in HTEmmanuel Grumbach
BT Coex needs to be updated when the bandwidth is modified by the AP. While at it, remove the vif parameter from bt_coex_vif_change since it was unused. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: keep connection to AP after WoWLANJohannes Berg
Until now, after WoWLAN, we weren't able to keep the connection to the AP because the firmware didn't give us the right information. Since the firmware API has been changed to include all the information we need, change the driver to work with the new API (if it is available) and program all the relevant information in mac80211 to keep the connection. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11Merge remote-tracking branch 'wireless-next/master' into HEADJohannes Berg
2013-10-11iwlwifi: mvm: add support for NICs which have only 16 Tx queues.Eytan Lifshitz
Some NICs embedded in platforms that have only 16 Tx queues, this affect the mapping of the Tx queues. Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: prevent the NIC to be powered at driver load time.Eytan Lifshitz
Some NICs aren't allowed to be powered up at driver load time. Fix it, and move the external NVM loading from driver load time to driver up time (parsing the external nvm file remains at driver load time). Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: Add device wide power commandAlexander Bondar
FW starts using legacy power table command (0x77) for device wide power settings. Currently this command contains only option flags field. It can configure the following: CAM (Continuous Active Mode) and POWER_SAVE_ENABLE debug option. Send this command when firmware is loaded - D0 and D3. Note: Setting this command is important to avoid unwanted FW behavior. It particularly fixes a bug when a device does not drop to low power after disassociation from AP. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: pcie: restart the driver when a command times outEmmanuel Grumbach
This should really not happen. If it does, restarting is the only way to recover since the driver and the firmware might very well be out of sync. Moreover, iwl_op_mode_nic_error will print data that might help debugging. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-10-11iwlwifi: mvm: BT Coex - set the proper LUT for single ant devicesEmmanuel Grumbach
Single shared antenna devices need a special LUT. Address this need. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>