summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
AgeCommit message (Collapse)Author
2013-09-16ath10k: remove wmi event worker threadMichal Kazior
It's not really necessary to have this processed in a worker. There are no sleepable calls (and actually shouldn't be). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-16ath10k: remove wmi pending count limitMichal Kazior
It is no longer used nor necessary since WMI commands can block. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-16ath10k: improve beacon submission latencyMichal Kazior
The patch prevents beacon misses in some case of heavy load on a system. If a beacon can't be transmitted directly from an SWBA event it will be left in arvif->beacon and transmission will be retried once TX credits become available. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-16ath10k: simplify HTC command submittingMichal Kazior
The patch removes HTC endpoint tx workers in favour of direct command submission. This makes a lot more sense for data path. mac80211 queues are effectively stopped/woken up in a more timely fashion preventing build up of frames. It's possible to push more traffic than the device/system is able to handle and have no hiccups or performance degradation with UDP traffic. WMI commands will now report errors properly and possibly block as they actively can wait for tx credits to become available. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-16ath10k: make WMI commands block by designMichal Kazior
This will be necessary for further changes in command submission scheme. Once HTC is cleaned up WMI commands will finally block. This requires for SWBA to be processed in a non-atomic context for now. Once other necessary changes are in this will be reverted. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-16ath10k: add HTC TX credits replenishing notificationMichal Kazior
This will allow higher layers to anticipate and act upon TX credits renewal. This will be important for some future rework of WMI command submission. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-16ath10k: simplify HTC credits calculationMichal Kazior
Credit calculation was overly complex unnecessarily. Now skb dequeing is more unified. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12wireless: ath10k: remove unnecessary pci_set_drvdata()Jingoo Han
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: delete struct ce_sendlistKalle Valo
struct ce_sendlist is useless as we always add just one buffer onto it. And most importantly, it's ugly as it doesn't use skb properly. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: Calculate correct peer PHY mode for VHTSujith Manoharan
The peer PHY mode for 11ac operation needs to be determined properly based on the channel bandwidth being used. Fix this so that the proper mode is given to the firmware. kvalo: earlier we used 11na-ht20 in STA mode for 11ac AP peer, this patch changes that to 11ac-vht80. I didn't notice any change in throughput in my tests, but nevertheless it's the right thing to do. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: print phymode as a stringKalle Valo
Makes it easier to read debug logs. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: clean mac.c debug messagesKalle Valo
Just to unify with the rest of debug messages. Minimal functional changes, only major ones are removal of the awkward "else" style in debug messages. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: add boot messages to htt.cKalle Valo
To unify the boot debug level. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: add boot debug messages to htc.cKalle Valo
To unify the boot debug level. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: add boot debug messages to pci.c and ce.cKalle Valo
To unify all boot related debug messages into one debug level. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: cleanup debug messages in core.cKalle Valo
Fix them to follow the general logging style in ath10k. While at it, add print id chip_id to the debug log. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: rename ATH10K_DBG_CORE to BOOTKalle Valo
core.c mostly deals with driver and firmware starting related actions. And we can use the boot level also in other components, like PCI and HTT. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-12ath10k: add BMI log levelKalle Valo
Also clean BMI log messages and add few more. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-10ath10k: define ath10k_debug_start/_stop as static inlineBartosz Markowski
Otherwise if CONFIG_ATH10K_DEBUGFS won't be set we will end up with multiple definitions and compilation failure in each place the header is included. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-08ath10k: prevent CE from looping indefinitelyMichal Kazior
The double while() could end up running forever. Inner while() would complete very fast. However the completion processing could take enough time for more completions to flow in. In that case the outer while() would not terminate and run again, and again. This could happen especially on a slow host system. This could lead to a system freeze during heavy traffic. Note: this doesn't solve all known starvation issues yet. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-06ath10k: remove obsolete INIT STATUS definitionsBartosz Markowski
There's no functional changes. Just a small cleanup. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-06ath10k: set the UART baud rate to 19200Bartosz Markowski
When configuring the host_interests over BMI, set the UART baud rate to 19200. This is valid for QCA988X_2.0 devices. kvalo: found during code review, there should not be any functionality changes Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-06ath10k: add htt_stats_enable debugfs fileKalle Valo
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-06ath10k: implement ath10k_debug_start/stop()Kalle Valo
Needed for the HTT stats implementation. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-06ath10k: add trace event ath10k_htt_statsKalle Valo
For analysing various data path statistics in user space. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-06ath10k: add missing braces to ath10k_pci_tx_pipe_cleanupDave Jones
The indentation here implies this was meant to be a multi-statement if, but it lacks the braces. kvalo: add "ath10k: " prefix Signed-off-by: Dave Jones <davej@fedoraproject.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03drivers/net: Convert uses of compare_ether_addr to ether_addr_equalJoe Perches
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: (and a little typing) $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-03ath10k: add chip_id file to debugfsKalle Valo
So that's it's possible to query chip id from ath10k anytime. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: check chip id from the soc register during probeKalle Valo
ath10k doesn't support qca988x hw1.0 boards anymore. Unfortunately the PCI id is the same in hw1.0 and hw2.0 so ath10k tries to use hw1.0 boards anyway. But without hw1.0 workarounds in place ath10k just crashes horribly. To avoid using hw1.0 boards at all add a chip id detection and fail the probe if hw1.0 is detected: [ 5265.786408] ath10k: ERROR: qca988x hw1.0 is not supported [ 5265.786497] ath10k: Unsupported chip id 0x043200ff [ 5265.786574] ath10k: could not register driver core (-95) [ 5265.793191] ath10k_pci: probe of 0000:02:00.0 failed with error -95 Also add a warning if there's an unknown chip id but continue the boot process normally anyway. Reported-by: Zaki Bakar <zaki.bm@gmail.com> Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: simplify ath10k_ce_init() wake up handlingKalle Valo
ath10k_ce_init() and the functions it calls wakeup the chip multiple times. Simplify that to call ath10k_pci_wake() only once. This also makes it easier to add error handling when wakeup fails. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: convert ath10k_pci_wake() to returnKalle Valo
We should not try to access hw if wakeup fails so add proper error checking for that. Also add the timeout lenght to the warning message. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: clean up ath10k_ce_completed_send_next_nolock()Kalle Valo
The error handling was just weird, simplify it. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: convert ath10k_pci_reg_read/write32() to take struct ath10kKalle Valo
This is consistent with all other functions. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: remove void pointer from struct ath10k_pci_complKalle Valo
Void pointers are bad, mmkay. No functional changes. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: make target_ce_config_wlan more readableKalle Valo
It's easier to read t if the field names are visible. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-03ath10k: pci: make host_ce_config_wlan[] more readableKalle Valo
It's much more readable if struct entries in host_ce_config_wlan are explicitly set. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-01ath10k: remove un ar_pci->cacheline_sz fieldKalle Valo
cacheline_sz is not used anywhere and can be removed. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-01ath10k: rename ce_ring_state to ath10k_ce_ringMichal Kazior
The new naming makes more sense. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-01ath10k: rename ce_state to ath10k_ce_pipeMichal Kazior
The new naming makes more sense. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-01ath10k: rename hif_ce_pipe_info to ath10k_pci_pipeMichal Kazior
The new naming makes more sense. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-01ath10k: remove unused ce_attr parametersMichal Kazior
Some parameters were unused and are not required. They have no representation in firmware. Clean them up. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-01ath10k: remove ce_op_stateMichal Kazior
It was only written to and never read back. No use to keep it around. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-01ath10k: use inline ce_state structureMichal Kazior
Simplifies memory managament of ce_state. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-08-28ath9k: Enable D3/L1 ASPM fix for AR9462Sujith Manoharan
AR9462 requires this HW fix for ASPM to work properly. Also, since WARegVal is used only for the AR8003 family, use AR_SREV_9300_20_OR_LATER. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-28ath9k: Remove unused ANI commandsSujith Manoharan
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-28Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2013-08-28ath9k: ar9003_eeprom.c:3618 fix variable name typoJohn W. Linville
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c: In function 'ar9003_hw_ant_ctrl_apply': >> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3618: warning: 'regval' is used uninitialized in this function It seems obvious that 'regval' should have been 'value'... Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-08-28Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/pcie/trans.c net/mac80211/ibss.c
2013-08-28ath10k: Fix mutex unlock balanceMohammed Shafi Shajakhan
ath10k_debug_read_target_stats is properly protected by data_lock (spinlock). Remove the unwanted mutex_unlock(&ar->conf_mutex) [ BUG: bad unlock balance detected! ] ------------------------------------- kworker/u4:0/12459 is trying to release lock (&ar->conf_mutex) at: [<c16a170d>] mutex_unlock+0xd/0x10 but there are no more locks to release! Call Trace: [<c16a170d>] ? mutex_unlock+0xd/0x10 [<c10b697d>] __lock_release+0x4d/0xe0 [<f88ca0fc>] ? ath10k_debug_read_target_stats+0xac/0x290 [<c16a170d>] ? mutex_unlock+0xd/0x10 [<c10b6a5b>] lock_release+0x4b/0x150 [<c16a1580>] __mutex_unlock_slowpath+0x70/0x150 [<f88ca0fc>] ? ath10k_debug_read_target_stats+0xac/0x290 [<c10b456b>] ? trace_hardirqs_on+0xb/0x10 [<c16a170d>] mutex_unlock+0xd/0x10 [<f88ca107>] ath10k_debug_read_target_stats+0xb7/0x290 [<f88d337a>] ath10k_wmi_event_process+0x3fa/0x6e0 [<c10b456b>] ? trace_hardirqs_on+0xb/0x10 [<f88d36e1>] ath10k_wmi_event_work+0x21/0x40 [ath10k_core] Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-08-26ath9k: Fix DEBUG_FS dependency for ath9kSujith Manoharan
Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>