Message ID | 1445948474-16738-1-git-send-email-rmanohar@qti.qualcomm.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Rajkumar Manoharan <rmanohar@qti.qualcomm.com> writes: > Removing supported chainmask fields as it can be always derived > from num_rf_chains. > > Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> All four patches applied, thanks.
On 29 October 2015 at 12:01, Kalle Valo <kvalo@qca.qualcomm.com> wrote: > Rajkumar Manoharan <rmanohar@qti.qualcomm.com> writes: > >> Removing supported chainmask fields as it can be always derived >> from num_rf_chains. >> >> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> > Hello, This one break monitor mode for qca988x and 10.x firmware: After Revert "ath10k: remove supported chain mask" - works correctly. [ 997.415152] ath10k_pci 0000:03:00.0: mac create vdev 0 map ffff [ 997.415154] ath10k_pci 0000:03:00.0: mac vdev create 0 (add interface) type 4 subtype 0 bcnmode per-skb [ 997.415156] ath10k_pci 0000:03:00.0: WMI vdev create: id 0 type 4 subtype 0 macaddr 00:00:00:00:00:00 [ 997.415157] ath10k_pci 0000:03:00.0: vdev param 0 not supported by firmware [ 997.415161] ath10k_pci 0000:03:00.0: wmi vdev id 0x0 set param 32 value 2 [ 997.415163] ath10k_pci 0000:03:00.0: wmi vdev id 0x0 set param 1 value -1 [ 997.415254] ath10k_pci 0000:03:00.0: mac txpower 0 [ 997.415269] ath10k_pci 0000:03:00.0: wmi pdev set param 3 value 0 [ 997.415423] ath10k_pci 0000:03:00.0: firmware crashed! (uuid d11e90aa-0f2a-433a-bcb4-eac63c6b7fdc) [ 997.424369] ath10k_pci 0000:03:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043022ff sub 168c:3342 [ 997.424371] ath10k_pci 0000:03:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 0 [ 997.424498] ath10k_pci 0000:03:00.0: firmware ver 10.1.467 api 2 features wmi-10.x,has-wmi-mgmt-tx crc32 ba069298 [ 997.424501] ath10k_pci 0000:03:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08 [ 997.424503] ath10k_pci 0000:03:00.0: htt-ver 2.1 wmi-op 2 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1 [ 997.426528] ath10k_pci 0000:03:00.0: firmware register dump: [ 997.432176] ath10k_pci 0000:03:00.0: [00]: 0x4100016C 0x00000000 0x0097F8D2 0x00000000 [ 997.440076] ath10k_pci 0000:03:00.0: [04]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.447975] ath10k_pci 0000:03:00.0: [08]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.455875] ath10k_pci 0000:03:00.0: [12]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.463774] ath10k_pci 0000:03:00.0: [16]: 0x00000000 0x00000000 0x00000000 0x0097F8D2 [ 997.471675] ath10k_pci 0000:03:00.0: [20]: 0x00000000 0x00401930 0x00000000 0x00000000 [ 997.479574] ath10k_pci 0000:03:00.0: [24]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.487473] ath10k_pci 0000:03:00.0: [28]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.495374] ath10k_pci 0000:03:00.0: [32]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.503273] ath10k_pci 0000:03:00.0: [36]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.511172] ath10k_pci 0000:03:00.0: [40]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.519072] ath10k_pci 0000:03:00.0: [44]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.526971] ath10k_pci 0000:03:00.0: [48]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.534871] ath10k_pci 0000:03:00.0: [52]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.542772] ath10k_pci 0000:03:00.0: [56]: 0x00000000 0x00000000 0x00000000 0x00000000 [ 997.550714] ath10k_pci 0000:03:00.0: failed to set 2g txpower 0: -108 [ 997.550715] ath10k_pci 0000:03:00.0: failed to setup tx power 0: -108 [ 997.550717] ath10k_pci 0000:03:00.0: failed to recalc tx power: -108 [ 997.550718] ath10k_pci 0000:03:00.0: WMI vdev delete id 0 BR Janusz
>>> Removing supported chainmask fields as it can be always derived >>> from num_rf_chains. >>> >>> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> >> > Hello, > > This one break monitor mode for qca988x and 10.x firmware: > After Revert "ath10k: remove supported chain mask" - works correctly. > Janusz, Thanks for reporting. Will send out patch asap. -Rajkumar
>>>> Removing supported chainmask fields as it can be always derived >>>> from num_rf_chains. >>>> >>>> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> >>> >> Hello, >> >> This one break monitor mode for qca988x and 10.x firmware: >> After Revert "ath10k: remove supported chain mask" - works correctly. >> >Janusz, > > Thanks for reporting. Will send out patch asap. > Janusz, It seems the change ("ath10k: remove supported chain mask") just exposed an hidden problem. The same target assert can be reproduced by below sequence even after reverting the commit. ifconfig wlan0 down iw wlan0 set type monitor iw phy0 set antenna 7 ifconfig wlan0 up The actual cause of target assert is below commit. commit 5572a95b4b5768187652a346356e39e7542ca6e0 Author: Ben Greear <greearb@candelatech.com> Date: Mon Nov 24 16:22:10 2014 +0200 ath10k: apply chainmask settings to vdev on creation Configuring NSS vdev param on interface addition is causing the target assert in 10.1 firmware. Just creating monitor interface is causing assert with qca_main firmware. -Rajkumar
On 02/25/2016 09:39 AM, Manoharan, Rajkumar wrote: >>>>> Removing supported chainmask fields as it can be always derived >>>>> from num_rf_chains. >>>>> >>>>> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> >>>> >>> Hello, >>> >>> This one break monitor mode for qca988x and 10.x firmware: >>> After Revert "ath10k: remove supported chain mask" - works correctly. >>> >> Janusz, >> >> Thanks for reporting. Will send out patch asap. >> > > Janusz, > > It seems the change ("ath10k: remove supported chain mask") just exposed an > hidden problem. The same target assert can be reproduced by below sequence > even after reverting the commit. > > ifconfig wlan0 down > iw wlan0 set type monitor > iw phy0 set antenna 7 > ifconfig wlan0 up > > The actual cause of target assert is below commit. > > commit 5572a95b4b5768187652a346356e39e7542ca6e0 > Author: Ben Greear <greearb@candelatech.com> > Date: Mon Nov 24 16:22:10 2014 +0200 > > ath10k: apply chainmask settings to vdev on creation > > Configuring NSS vdev param on interface addition is causing the target assert in 10.1 firmware. > Just creating monitor interface is causing assert with qca_main firmware. Maybe change that patch so that it does not attempt to set nss just for monitor interfaces? Thanks, Ben > > > -Rajkumar >
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 7cc7cdd..cd598cf 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -730,8 +730,6 @@ struct ath10k { int num_started_vdevs; /* Protected by conf-mutex */ - u8 supp_tx_chainmask; - u8 supp_rx_chainmask; u8 cfg_tx_chainmask; u8 cfg_rx_chainmask; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 484c1a1..b4eb9fd 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3736,13 +3736,8 @@ static int ath10k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) mutex_lock(&ar->conf_mutex); - if (ar->cfg_tx_chainmask) { - *tx_ant = ar->cfg_tx_chainmask; - *rx_ant = ar->cfg_rx_chainmask; - } else { - *tx_ant = ar->supp_tx_chainmask; - *rx_ant = ar->supp_rx_chainmask; - } + *tx_ant = ar->cfg_tx_chainmask; + *rx_ant = ar->cfg_rx_chainmask; mutex_unlock(&ar->conf_mutex); @@ -3884,9 +3879,7 @@ static int ath10k_start(struct ieee80211_hw *hw) } } - if (ar->cfg_tx_chainmask) - __ath10k_set_antenna(ar, ar->cfg_tx_chainmask, - ar->cfg_rx_chainmask); + __ath10k_set_antenna(ar, ar->cfg_tx_chainmask, ar->cfg_rx_chainmask); /* * By default FW set ARP frames ac to voice (6). In that case ARP @@ -7157,8 +7150,8 @@ int ath10k_mac_register(struct ath10k *ar) BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_MESH_POINT); - ar->hw->wiphy->available_antennas_rx = ar->supp_rx_chainmask; - ar->hw->wiphy->available_antennas_tx = ar->supp_tx_chainmask; + ar->hw->wiphy->available_antennas_rx = ar->cfg_rx_chainmask; + ar->hw->wiphy->available_antennas_tx = ar->cfg_tx_chainmask; if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->fw_features)) ar->hw->wiphy->interface_modes |= diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 6e7d7a7..b36ecf2 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -4335,8 +4335,10 @@ static void ath10k_wmi_event_service_ready_work(struct work_struct *work) ar->num_rf_chains = ar->max_spatial_stream; } - ar->supp_tx_chainmask = (1 << ar->num_rf_chains) - 1; - ar->supp_rx_chainmask = (1 << ar->num_rf_chains) - 1; + if (!ar->cfg_tx_chainmask) { + ar->cfg_tx_chainmask = (1 << ar->num_rf_chains) - 1; + ar->cfg_rx_chainmask = (1 << ar->num_rf_chains) - 1; + } if (strlen(ar->hw->wiphy->fw_version) == 0) { snprintf(ar->hw->wiphy->fw_version,
Removing supported chainmask fields as it can be always derived from num_rf_chains. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> --- drivers/net/wireless/ath/ath10k/core.h | 2 -- drivers/net/wireless/ath/ath10k/mac.c | 17 +++++------------ drivers/net/wireless/ath/ath10k/wmi.c | 6 ++++-- 3 files changed, 9 insertions(+), 16 deletions(-)