summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-09-27ath10k: split ath10k_wmi_service_ready_event_rxBartosz Markowski
Since the both firmwares we are going to support, have significantly different APIs (WMI and shared structures), it's easier to actually split the whole event handling functions, instead cutting them inside. The fork starts now on ath10k_wmi_process_rx(). Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-27ath10k: implement WMI events handling frame for both firmwaresBartosz Markowski
We still use the same function handlers for both main and 10.X paths. Next step is to track down and make the split needed. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-27ath10k: warn if give WMI command is not supportedBartosz Markowski
This will show and make it easier to track the API differences in the new AP firmware. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-27ath10k: add wmi_10x_<cmd/event> definitionsBartosz Markowski
Introduce the cmd and events definitions for 10.X FW API and make up the wmi_10x_cmd_map. This is the core of host-firmware WMI interface for 10.X FW branch. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-27ath10k: introduce dynamic WMI structuresBartosz Markowski
This is the initial framework to implement dynamic WMI API in order to support new firmware (from so called 10.X branch) The realization is to have a static WMI cmd map for each of the firmwares, registered upom wmi init. This patch creates such map for MAIN FW, updates wmi_cmd_send() calls to take as a parameter the map value instead of direct WMI enum. As soon as complete 10.X API will be on place, we will introduce the FW IE mechanics to dynamicaly identify which FW is being used and based on that we will use correct map, API, structures, etc. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-26ath10k: make monitor vdev down before stoping itMarek Puzyniak
Following sequence causes FW crash: -monitor vdev up, -monitor vdev stop, -monitor vdev delete. Making monitor vdev down before stoping it works ok: -monitor vdev up, -monitor vdev down, -monitor vdev stop, -monitor vdev delete. Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-26ath10k: replenish HTT RX buffers in a taskletMichal Kazior
This starves FW RX ring buffer in case of excessive RX. This prevents from CPU being overwhelmed by RX indications/completions by naturally forbiddin FW to submit more RX. This fixes RX starvation on slow machines when under heavy RX traffic. kvalo: remove extra newline Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-26ath10k: align RX frames properlyMichal Kazior
Ethernet-like decapping mode leaves IP protocol frame not aligned to 4-byte boundaries. This leads to re-aligning in mac80211 which in turn leads to poor CPU cache behaviour on some machines. Since HW doesn't allow to change payload offset properly the solution is to force HW to decap in Native Wifi mode which always has 24-bytes long 802.11 header (even for QoS frames). This means IP frame is properly aligned in this decap mode. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-26ath10k: fix Native Wifi decap mode RXMichal Kazior
NWifi decap mode always reports 802.11 Data Frames, even when QoS Data Frames are actually received. This made mac80211 not report frame priority properly (since there was no QoS Control field). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-26ath10k: cleanup RX decap handlingMichal Kazior
Simplify decapping code and make it easier to understand. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-26ath10k: document decap modesMichal Kazior
Clarify how each decap mode works in one place. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-26ath10k: report A-MSDU subframes individuallyMichal Kazior
HW reports each A-MSDU subframe as a separate sk_buff. It is impossible to configure it to behave differently. Until now ath10k was reconstructing A-MSDUs from subframes which involved a lot of memory operations. This proved to be a significant contributor to degraded RX performance. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: use msdu headroom to store txfragMichal Kazior
Instead of allocating sk_buff for a mere 16-byte tx fragment list buffer use headroom of the original msdu sk_buff. This decreases CPU cache pressure and improves performance. Measured improvement on AP135 is 560mbps -> 590mbps of UDP TX briding traffic. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: cleanup HTT TX functionsMichal Kazior
Use a saner goto scheme for failure handling. Also group operations more sensibly. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: decouple HTT TX completionsMichal Kazior
Until now the all MSDU transfer related structures were freed when all resources were unreferenced. Now HTC transfer is freed independently and HTT transfer is so too. This yields a way more simpler ath10k_skb_cb and should possibly enable parallel pipe processing (which is now serialized in ath10k_pci_process_ce routine). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: avoid needless memset on TX pathMichal Kazior
This reduces number of memory accesses and hopefully contributes to better performance in the future. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: use num_pending_tx instead of msdu id bitmapMichal Kazior
It's more efficient to simply check num_pending_tx value instead of traversing whole bitmap of msdu ids. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: fix num_sends_allowed replenishingMichal Kazior
Commit e9bb0aa39 ("ath10k: delete struct ce_sendlist") broke num_sends_allowed incrementing. num_sends_allowed exceeded initial values and could overflow. This code was supposed to replenish num_sends_allowed for partial sendlist items (i.e. before final sendlist item from a sendlist was completed and could be processed by completion handlers). Fortunately it seems it did not cause any major breakage, yet. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2013-09-20ath10k: fix tracing build for ath10k_wmi_cmdMichal Kazior
Commit be8b394390 ("ath10k: make WMI commands block by design") broke the build if CONFIG_ATH10K_TRACING was enabled. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
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-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>