- 16 Oct, 2013 8 commits
-
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-
Bartosz Markowski authored
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>
-
Bartosz Markowski authored
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>
-
Bartosz Markowski authored
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>
-
- 09 Oct, 2013 2 commits
-
-
Fengguang Wu authored
drivers/net/wireless/ath/ath10k/core.c:507:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
ath10k_debug_start() was not called with conf_mutex, fix that. Also there was a deadlock in ath10k_debug_stop(), rename it to ath10k_debug_destroy() and call it only when the device is destroyed. Reported-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
- 08 Oct, 2013 4 commits
-
-
Sujith Manoharan authored
For VHT peers, the maximum A-MPDU size has to be calculated from the VHT capabilities element and not the HT-cap. The formula is the same, but a higher value is used in VHT, allowing larger aggregates to be transmitted. The patch contains a workaround for some Netgear/Linksys APs that report Rx A-MPDU factor incorrectly. Tested-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Michal Kazior authored
Due to oversight AP 10.X support was merged with Ethernet RX decap mode. Only Native Wifi RX decap mode guarantees IP header is properly aligned and avoids sk_buff data realignment (which is very expensive performance-wise) in mac80211. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Michal Kazior authored
Some failpaths did `return` instead of a `goto` leaking requested firmware. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Michal Kazior authored
size_t corresponds to %zu not %d. Compiler was complaining about it. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
- 07 Oct, 2013 6 commits
-
-
Michal Kazior authored
The value provided by num_sends_allowed is now derived from CE source ringbuffer state. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Michal Kazior authored
It is completely pointless to keep this function around. It doesn't do anything different than ce_send except it introduces more overhead. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Michal Kazior authored
Tidy up ath10k_tx(). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Michal Kazior authored
Tidy up ath10k_tx(). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
It was observed few times, the artificial max_scan limit we are using mainly to detect FW hangs, can be not enough for instance while being associated and during heavy traffic. What we do if the FW won't return with scan results within the max_time time is a scan abort. This is especially visible with 10.X fw which in combination with dual band HW (scanning 32 channels) can end up with hw_scan close to 10 seconds. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
Since the WMI API has been added and we can detect from the FW IEs what firmware variant we deal with, turn on support for 10.x firmware branch in ath10k_wmi_attach(). kvalo: improve the commit log Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
- 01 Oct, 2013 1 commit
-
-
Vladimir Murzin authored
Fix the warning drivers/net/wireless/ath/ath6kl/htc_pipe.c: In function 'ath6kl_htc_pipe_conn_service': drivers/net/wireless/ath/ath6kl/htc_pipe.c:1293:26: warning: integer overflow in expression [-Woverflow] by giving a hint to compiler about unsigned nature of HTC_CONN_FLGS_SET_RECV_ALLOC_MASK Signed-off-by: Vladimir Murzin <murzin.v@gmail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
- 30 Sep, 2013 3 commits
-
-
Kalle Valo authored
Firmware IE containers can dynamically provide various information what firmware supports. Also it can embed more than one image so updating firmware is easy, user just needs to update one file in /lib/firmware/. The firmware API 2 or higher will use the IE container format, the current API 1 will not use the new format but it still is supported for some time. FW API 2 files are named as firmware-2.bin (which contains both firmware and otp images) and API 1 files are firmware.bin and otp.bin. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
Needed for firmware IE formatted images. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Kalle Valo authored
I will use board_data for something else in the following patch so I need to rename it. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
- 27 Sep, 2013 13 commits
-
-
Bartosz Markowski authored
The wmi_start_scan_cmd has an extra filed in our main firmware track, reflact that to not have a mismatch in case of 10.x track. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
This is done exactly the same way as for vdev. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
Both firmwares (main and 10.x) have different set of vdev parameters. To stay in sync with FW API, this patch introduces a dynamic registering method. ath10k_wmi_vdev_set_param() takes now indirect u32 value to identify the Vdev parameter it want's to set. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
Introduce all TARGET specific values for 10.x firmware. Some of them are common for both firmwares we will support, but to avoid confusion, define everything with prefix 10X_. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
Due to API differences in initialization structures for main and 10.x firmwares we need to split the wmi_init_cmd and wmi_resource_config structures. This will be usefull also when setting the correct TARGET values, like: number of peers, vdevs, pdevs etc. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
This is still the only way to submit mgmt frames in case of 10.X firmware. This patch introduces wmi_mgmt_tx queue, because of the fact WMI command can block. This is a problem for ath10k_tx_htt(), since it's called from atomic context. The skb queue and worker are introduced to move the mgmt frame handling out of .tx callback context and not block. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
10.X firmware can request a memory pool from host to offload it's own resources. This is a feature designed especially for AP mode where the target has to deal with large number of peers. So we allocate and map a consistent DMA memory which FW can use to store e.g. peer rate contol maps. Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
It was corrupted and leading to compilation warning core.c: In function 'ath10k_check_fw_version': core.c:79: warning: comparison is always true due to limited range of data type Since we are going to support new FW track in the driver, the sanity check for fw version number would be an overkill then. This is just for information purposes anyway. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-
Bartosz Markowski authored
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>
-
Bartosz Markowski authored
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>
-
Bartosz Markowski authored
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>
-
Bartosz Markowski authored
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>
-
Bartosz Markowski authored
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>
-
- 26 Sep, 2013 3 commits
-
-
Marek Puzyniak authored
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>
-
Michal Kazior authored
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>
-
Michal Kazior authored
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>
-