summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: Remove ath_ant_comb_update()Sujith Manoharan2013-08-054-28/+1
| | | | | | | | | | | | During a HW reset, the diversity config is programmed in the set_board_values() eeprom callback, there is no need to do it again by calling ath_ant_comb_update(). Fixed antenna support is not fully handled for 1-stream cards, it can be done later. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* hostap: do not return positive number on failure path in prism2_open()Alexey Khoroshilov2013-08-051-2/+2
| | | | | | | | | | prism2_open() as an .ndo_open handler should not return positive numbers in case of failure, but it does return 1 in a couple of places. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Support ANT diversity for WB225Sujith Manoharan2013-08-053-41/+86
| | | | | | | | | | WB225 based cards like CUS198 and CUS230 support both fast antenna diversity and LNA combining. Add support for this and also program the SWCOM register with the correct "ant_ctrl_comm2g_switch_enable" value. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Set SWCOM value for CUS198Sujith Manoharan2013-08-052-0/+2
| | | | | | | | | CUS198/CUS230 cards require a custom value to be programmed into the SWCOM register. Assign this during init time. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove "shared_chain_lnadiv"Sujith Manoharan2013-08-054-4/+3
| | | | | | | | | This variable is redundant since we can use common->bt_ant_diversity to determine if diversity has to be enabled/disabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Program HW for WB195 diversitySujith Manoharan2013-08-052-0/+66
| | | | | | | | | | The MC_GAIN_CTL/CCK_DETECT registers have to be programmed with the correct configuration values if WLAN/BT RX diversity is enabled. Add this and also take care of the BTCOEX mode when fast diversity is enabled/disabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Enable WLAN/BT Ant Diversity for WB225/WB195Sujith Manoharan2013-08-051-5/+13
| | | | | | | | | | | | A custom solution for Asus is WB195 based and supports WLAN/BT Rx diversity. Identify this card and set the capability. CUS198/CUS230, which are based on WB225 also support WLAN/BT Rx diversity. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Rename ath9k_hw_antctrl_shared_chain_lnadivSujith Manoharan2013-08-054-9/+7
| | | | | | | Use "ath9k_hw_set_bt_ant_diversity" instead. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add a HW capability for WLAN/BT RX diversitySujith Manoharan2013-08-054-9/+28
| | | | | | | | | Make use of this capability to restrict the usage of the debugfs file and modparam using which this feature can be enabled. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Cleanup WLAN/BT RX diversitySujith Manoharan2013-08-054-28/+26
| | | | | | | | | For single-chain WLAN+BT cards, the BT antenna can be used for WLAN RX when the BT interface is disabled. Rename the modparam "antenna_diversity" to "bt_ant_diversity" to clarify this. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix antenna diversity for CUS198Sujith Manoharan2013-08-053-26/+59
| | | | | | | | | | CUS198/CUS230 need a few tweaks in the antenna diversity algorithm to accomodate RSSI variation. Add a couple of knobs to control low RSSI threshold and fast antenna diversity bias values. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Print LNA combining mode during initSujith Manoharan2013-08-051-15/+9
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add information about antenna diversitySujith Manoharan2013-08-051-0/+52
| | | | | Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge tag 'for-linville-20130730' of git://github.com/kvalo/ath6klJohn W. Linville2013-08-0219-454/+959
|\
| * ath10k: fix rts/fragmentation threshold setupMichal Kazior2013-07-301-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | If RTS and fragmentation threshold values are 0xFFFFFFFF they should be considered disabled and no min/max limits must be applied. This fixes some issues with throughput issues, especially with VHT. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix memleak in mac setupMichal Kazior2013-07-301-11/+15
| | | | | | | | | | | | | | | | | | | | In some cases channel arrays were never freed. The patch also unifies error handling in the mac setup function. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: don't reset HTC endpoints unnecessarilyMichal Kazior2013-07-301-1/+0
| | | | | | | | | | | | | | | | | | | | Endpoints are re-initialized upon HTC start anyway so there's no need to do that twice in case of restarting HTC (i.e. in case of hardware recovery). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: prevent HTC from being used after stoppingMichal Kazior2013-07-302-16/+15
| | | | | | | | | | | | | | | | | | It was possible to submit new HTC commands after/while HTC stopped. This led to memory corruption in some rare cases. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: create debugfs interface to trigger fw crashMichal Kazior2013-07-301-0/+57
| | | | | | | | | | | | | | | | | | | | | | This can be useful for testing. To perform a forced firmware crash write 'crash' to 'simulate_fw_crash' debugfs file. E.g. echo crash > /sys/kernel/debug/ieee80211/phy1/ath10k/simulate_fw_crash Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix NULL dereference for injected packetsMichal Kazior2013-07-301-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | Tx processing functions dereference vif and caused NULL to be dereferenced for injected frames. Don't call these functions at all for injected frames. It doesn't make much sense to do so anyway. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: implement fw crash simulation commandMichal Kazior2013-07-302-0/+38
| | | | | | | | | | | | | | This can be useful to test FW crash handling. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: implement device recoveryMichal Kazior2013-07-307-19/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restart the hardware if FW crashes. If FW crashes during recovery we leave the hardware in a "wedged" state to avoid recursive recoveries. When in "wedged" state userspace may bring interfaces down (to issue stop()) and then bring one interface (to issue start()) to reload hardware manually. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: skip fw stats debugfs interface if device is downMichal Kazior2013-07-301-14/+16
| | | | | | | | | | | | | | | | | | | | | | If the device is not running then there may be no FW at all to send the query to. If the FW is already there it might still trigger a crash if the command is sent before the device is fully initialized. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: store firmware files in memoryMichal Kazior2013-07-302-52/+109
| | | | | | | | | | | | | | | | | | | | | | | | Different FW versions may provide different functions thus mean different hw capabilities advertised to mac80211. It is safe to swap firmware files on disk during driver/device runtime without worries. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: defer hw setup to start/stop mac80211 hooksMichal Kazior2013-07-303-32/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes suspend-to-disk. The hardware is now re-initialized upon freeze/thaw properly. This also makes suspend/resume re-initialize the hardware as WoWLAN support is not done yet. With some little work it should be possible to support hw reconfiguration for hw/fw recovery. HW must be initialized once before registering to mac80211 because FW determinates what hw capabilities can be advertised. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: make sure all resources are freed upon ath10k_stop()Michal Kazior2013-07-301-0/+25
| | | | | | | | | | | | | | | | This is necessary for proper hw reconfiguration and to avoid memory leaks. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: move free_vdev_map initializationMichal Kazior2013-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is necessary for hw reconfiguration to work. Since mac80211 is not calling remove_interface() is such case we must reset free_vdev_map. Also use a define instead of a hardcoded value for vdev map initialization. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: decouple suspend codeMichal Kazior2013-07-305-154/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split up fw-related and hw-related suspension code. Although we don't advertise WoW support to mac80211 yet it's useful to keep the code in suspend/resume hooks. At this point there's no need to keep pci pm ops. In case of WoW mac80211 calls ath10k_suspend() which should take care of entering low-power mode. In case WoW is not available mac80211 will go through regular interface teradown and use start/stop. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: reset BMI state upon initMichal Kazior2013-07-303-0/+9
| | | | | | | | | | | | | | | | This is necessary if we want to be able to restart hw on-the-fly. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: allow deferred regd updateMichal Kazior2013-07-302-7/+26
| | | | | | | | | | | | | | | | | | Regulatory domain notification hook can be called regardless of the hw state (i.e. before start mac80211 callback). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: decouple core start/stop logicMichal Kazior2013-07-302-12/+34
| | | | | | | | | | | | | | | | | | Enables code reuse for proper hw reconfiguration that is in turn required for proper suspend/hibernation/wowlan support. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: decouple pci start/stop logicMichal Kazior2013-07-302-39/+91
| | | | | | | | | | | | | | | | | | | | | | Split logic that prepares the device for BMI phase/cleans up related resources. This is necessary for ath10k to be able to restart hw on the fly without reloading the module. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: add missing debug printsMichal Kazior2013-07-301-0/+6
| | | | | | | | | | Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: abort scan properly if wmi_scan_stop failsMichal Kazior2013-07-301-0/+4
| | | | | | | | | | Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: improve lockingMichal Kazior2013-07-301-2/+55
| | | | | | | | | | | | | | | | Add more lockdep asserts and a few conf_mutex locks. It's better to be on the safe side. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: embed HTT struct inside ath10kMichal Kazior2013-07-307-34/+34
| | | | | | | | | | | | | | | | This reduces number of allocations and simplifies memory managemnt. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: embed HTC struct inside ath10kMichal Kazior2013-07-307-46/+27
| | | | | | | | | | | | | | | | This reduces number of allocations and simplifies memory managemnt. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: rename hif callbackMichal Kazior2013-07-303-9/+9
| | | | | | | | | | | | | | | | | | The `set_callbacks` is a more appopriate name for the function. Let's leave `init` for something else. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: change function to take struct ath10k as argMichal Kazior2013-07-301-3/+3
| | | | | | | | | | | | | | | | This aligns it to the argument list of other similar functions. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: provide errno if bmi read/write failsMichal Kazior2013-07-301-2/+4
| | | | | | | | | | Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: lower print level for a messageMichal Kazior2013-07-301-2/+3
| | | | | | | | | | Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: silent warning in IBSS modeMichal Kazior2013-07-301-2/+2
| | | | | | | | | | | | | | | | There is no TIM IE generated in IBSS beacons by mac80211. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix typo in define nameMichal Kazior2013-07-303-6/+6
| | | | | | | | | | Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove ath10k_busMichal Kazior2013-07-303-10/+1
| | | | | | | | | | | | | | It serves no purpose. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: do not setup rts/frag thresholds for suspended interfacesMichal Kazior2013-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mac80211 calls for rts/frag threshold hooks before any interface is brought back up again when resuming. We would set vdev parameters before given vdev is created lading to a FW crash. rts/frag thresholds will be re-set accordingly in add_interface() hook anyway. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: setup rts/frag thresholds upon vdev creationMichal Kazior2013-07-301-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | mac80211 configures rts/frag thresholds per-hw not per-vif. ath10k FW expects those values to be set per-vdev (i.e. per-vif). ath10k should now respect rts/frag thresholds set before a given interface was brought up. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix possible deadlockMichal Kazior2013-07-301-4/+6
| | | | | | | | | | | | | | | | | | It was possible to have a deadlock due to inverted locking of local->iflist_mtx and ath10k->conf_mutex. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: fix teardown orderingMichal Kazior2013-07-301-1/+1
| | | | | | | | | | | | | | | | This should fix memory corruption if HIF is tried to be restarted. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | Merge branch 'for-john' of ↵John W. Linville2013-08-0248-893/+1309
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
| * | iwlwifi: mvm: advertise support for DYNAMIC / STATIC SMPSEmmanuel Grumbach2013-07-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This feature is fully supported by iwlwmvm, so advertise it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
OpenPOWER on IntegriCloud