* [PATCH AUTOSEL 4.14 013/115] ath10k: fix vdev-start timeout on error
[not found] <20191113015622.11592-1-sashal@kernel.org>
@ 2019-11-13 1:54 ` Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 016/115] ath9k: fix reporting calculated new FFT upper max Sasha Levin
` (9 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Ben Greear, Kalle Valo, Sasha Levin, ath10k, linux-wireless,
netdev
From: Ben Greear <greearb@candelatech.com>
[ Upstream commit 833fd34d743c728afe6d127ef7bee67e7d9199a8 ]
The vdev-start-response message should cause the
completion to fire, even in the error case. Otherwise,
the user still gets no useful information and everything
is blocked until the timeout period.
Add some warning text to print out the invalid status
code to aid debugging, and propagate failure code.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath10k/core.h | 1 +
drivers/net/wireless/ath/ath10k/mac.c | 2 +-
drivers/net/wireless/ath/ath10k/wmi.c | 19 ++++++++++++++++---
drivers/net/wireless/ath/ath10k/wmi.h | 8 +++++++-
4 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 949ebb3e967bb..be9ec265dfe55 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -881,6 +881,7 @@ struct ath10k {
struct completion install_key_done;
+ int last_wmi_vdev_start_status;
struct completion vdev_setup_done;
struct workqueue_struct *workqueue;
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 58a3c42c4aedb..259ef6a0d1740 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -954,7 +954,7 @@ static inline int ath10k_vdev_setup_sync(struct ath10k *ar)
if (time_left == 0)
return -ETIMEDOUT;
- return 0;
+ return ar->last_wmi_vdev_start_status;
}
static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id)
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index ab8eb9cdfda0f..c29e908c97317 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -3132,18 +3132,31 @@ void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb)
{
struct wmi_vdev_start_ev_arg arg = {};
int ret;
+ u32 status;
ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_START_RESP_EVENTID\n");
+ ar->last_wmi_vdev_start_status = 0;
+
ret = ath10k_wmi_pull_vdev_start(ar, skb, &arg);
if (ret) {
ath10k_warn(ar, "failed to parse vdev start event: %d\n", ret);
- return;
+ ar->last_wmi_vdev_start_status = ret;
+ goto out;
}
- if (WARN_ON(__le32_to_cpu(arg.status)))
- return;
+ status = __le32_to_cpu(arg.status);
+ if (WARN_ON_ONCE(status)) {
+ ath10k_warn(ar, "vdev-start-response reports status error: %d (%s)\n",
+ status, (status == WMI_VDEV_START_CHAN_INVALID) ?
+ "chan-invalid" : "unknown");
+ /* Setup is done one way or another though, so we should still
+ * do the completion, so don't return here.
+ */
+ ar->last_wmi_vdev_start_status = -EINVAL;
+ }
+out:
complete(&ar->vdev_setup_done);
}
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index d0e05aa437e36..947b74c64fec0 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -6480,11 +6480,17 @@ struct wmi_ch_info_ev_arg {
__le32 rx_frame_count;
};
+/* From 10.4 firmware, not sure all have the same values. */
+enum wmi_vdev_start_status {
+ WMI_VDEV_START_OK = 0,
+ WMI_VDEV_START_CHAN_INVALID,
+};
+
struct wmi_vdev_start_ev_arg {
__le32 vdev_id;
__le32 req_id;
__le32 resp_type; /* %WMI_VDEV_RESP_ */
- __le32 status;
+ __le32 status; /* See wmi_vdev_start_status enum above */
};
struct wmi_peer_kick_ev_arg {
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 016/115] ath9k: fix reporting calculated new FFT upper max
[not found] <20191113015622.11592-1-sashal@kernel.org>
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 013/115] ath10k: fix vdev-start timeout on error Sasha Levin
@ 2019-11-13 1:54 ` Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 019/115] nl80211: Fix a GET_KEY reply attribute Sasha Levin
` (8 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Simon Wunderlich, Nick Kossifidis, Kalle Valo, Sasha Levin,
linux-wireless, netdev
From: Simon Wunderlich <sw@simonwunderlich.de>
[ Upstream commit 4fb5837ac2bd46a85620b297002c704e9958f64d ]
Since the debug print code is outside of the loop, it shouldn't use the loop
iterator anymore but instead print the found maximum index.
Cc: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c
index a41bcbda1d9e8..37d5994eb1ccd 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
@@ -411,7 +411,7 @@ ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs,
ath_dbg(common, SPECTRAL_SCAN,
"Calculated new upper max 0x%X at %i\n",
- tmp_mag, i);
+ tmp_mag, fft_sample_40.upper_max_index);
} else
for (i = dc_pos; i < SPECTRAL_HT20_40_NUM_BINS; i++) {
if (fft_sample_40.data[i] == (upper_mag >> max_exp))
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 019/115] nl80211: Fix a GET_KEY reply attribute
[not found] <20191113015622.11592-1-sashal@kernel.org>
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 013/115] ath10k: fix vdev-start timeout on error Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 016/115] ath9k: fix reporting calculated new FFT upper max Sasha Levin
@ 2019-11-13 1:54 ` Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 059/115] brcmfmac: reduce timeout for action frame scan Sasha Levin
` (7 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Andrew Zaborowski, Johannes Berg, Sasha Levin, linux-wireless,
netdev
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
[ Upstream commit efdfce7270de85a8706d1ea051bef3a7486809ff ]
Use the NL80211_KEY_IDX attribute inside the NL80211_ATTR_KEY in
NL80211_CMD_GET_KEY responses to comply with nl80211_key_policy.
This is unlikely to affect existing userspace.
Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/wireless/nl80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 9627c52c3f937..df8c5312f26ad 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3118,7 +3118,7 @@ static void get_key_callback(void *c, struct key_params *params)
params->cipher)))
goto nla_put_failure;
- if (nla_put_u8(cookie->msg, NL80211_ATTR_KEY_IDX, cookie->idx))
+ if (nla_put_u8(cookie->msg, NL80211_KEY_IDX, cookie->idx))
goto nla_put_failure;
nla_nest_end(cookie->msg, key);
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 059/115] brcmfmac: reduce timeout for action frame scan
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (2 preceding siblings ...)
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 019/115] nl80211: Fix a GET_KEY reply attribute Sasha Levin
@ 2019-11-13 1:55 ` Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 060/115] brcmfmac: fix full timeout waiting for action frame on-channel tx Sasha Levin
` (6 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Chung-Hsien Hsu, Chi-Hsien Lin, Kalle Valo, Sasha Levin,
linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
netdev
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
[ Upstream commit edb6d6885bef82d1eac432dbeca9fbf4ec349d7e ]
Finding a common channel to send an action frame out is required for
some action types. Since a loop with several scan retry is used to find
the channel, a short wait time could be considered for each attempt.
This patch reduces the wait time from 1500 to 450 msec for each action
frame scan.
This patch fixes the WFA p2p certification 5.1.20 failure caused by the
long action frame send time.
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index 450f2216fac2d..c9566c9036721 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -74,7 +74,7 @@
#define P2P_AF_MAX_WAIT_TIME msecs_to_jiffies(2000)
#define P2P_INVALID_CHANNEL -1
#define P2P_CHANNEL_SYNC_RETRY 5
-#define P2P_AF_FRM_SCAN_MAX_WAIT msecs_to_jiffies(1500)
+#define P2P_AF_FRM_SCAN_MAX_WAIT msecs_to_jiffies(450)
#define P2P_DEFAULT_SLEEP_TIME_VSDB 200
/* WiFi P2P Public Action Frame OUI Subtypes */
@@ -1139,7 +1139,6 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p)
{
struct afx_hdl *afx_hdl = &p2p->afx_hdl;
struct brcmf_cfg80211_vif *pri_vif;
- unsigned long duration;
s32 retry;
brcmf_dbg(TRACE, "Enter\n");
@@ -1155,7 +1154,6 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p)
* pending action frame tx is cancelled.
*/
retry = 0;
- duration = msecs_to_jiffies(P2P_AF_FRM_SCAN_MAX_WAIT);
while ((retry < P2P_CHANNEL_SYNC_RETRY) &&
(afx_hdl->peer_chan == P2P_INVALID_CHANNEL)) {
afx_hdl->is_listen = false;
@@ -1163,7 +1161,8 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p)
retry);
/* search peer on peer's listen channel */
schedule_work(&afx_hdl->afx_work);
- wait_for_completion_timeout(&afx_hdl->act_frm_scan, duration);
+ wait_for_completion_timeout(&afx_hdl->act_frm_scan,
+ P2P_AF_FRM_SCAN_MAX_WAIT);
if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) ||
(!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL,
&p2p->status)))
@@ -1176,7 +1175,7 @@ static s32 brcmf_p2p_af_searching_channel(struct brcmf_p2p_info *p2p)
afx_hdl->is_listen = true;
schedule_work(&afx_hdl->afx_work);
wait_for_completion_timeout(&afx_hdl->act_frm_scan,
- duration);
+ P2P_AF_FRM_SCAN_MAX_WAIT);
}
if ((afx_hdl->peer_chan != P2P_INVALID_CHANNEL) ||
(!test_bit(BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL,
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 060/115] brcmfmac: fix full timeout waiting for action frame on-channel tx
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (3 preceding siblings ...)
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 059/115] brcmfmac: reduce timeout for action frame scan Sasha Levin
@ 2019-11-13 1:55 ` Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 061/115] qtnfmac: pass sgi rate info flag to wireless core Sasha Levin
` (5 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Chung-Hsien Hsu, Chi-Hsien Lin, Kalle Valo, Sasha Levin,
linux-wireless, brcm80211-dev-list.pdl, brcm80211-dev-list,
netdev
From: Chung-Hsien Hsu <stanley.hsu@cypress.com>
[ Upstream commit fbf07000960d9c8a13fdc17c6de0230d681c7543 ]
The driver sends an action frame down and waits for a completion signal
triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event
to continue the process. However, the action frame could be transmitted
either on the current channel or on an off channel. For the on-channel
case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when
the frame is transmitted, which make the driver always wait a full
timeout duration. This patch has the completion signal be triggered by
receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel
case.
This change fixes WFA p2p certification 5.1.19 failure.
Signed-off-by: Chung-Hsien Hsu <stanley.hsu@cypress.com>
Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../wireless/broadcom/brcm80211/brcmfmac/p2p.c | 17 +++++++++++++++--
.../wireless/broadcom/brcm80211/brcmfmac/p2p.h | 2 ++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index c9566c9036721..4a883f4bbf885 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -1462,10 +1462,12 @@ int brcmf_p2p_notify_action_tx_complete(struct brcmf_if *ifp,
return 0;
if (e->event_code == BRCMF_E_ACTION_FRAME_COMPLETE) {
- if (e->status == BRCMF_E_STATUS_SUCCESS)
+ if (e->status == BRCMF_E_STATUS_SUCCESS) {
set_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED,
&p2p->status);
- else {
+ if (!p2p->wait_for_offchan_complete)
+ complete(&p2p->send_af_done);
+ } else {
set_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status);
/* If there is no ack, we don't need to wait for
* WLC_E_ACTION_FRAME_OFFCHAN_COMPLETE event
@@ -1516,6 +1518,17 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p,
p2p->af_sent_channel = le32_to_cpu(af_params->channel);
p2p->af_tx_sent_jiffies = jiffies;
+ if (test_bit(BRCMF_P2P_STATUS_DISCOVER_LISTEN, &p2p->status) &&
+ p2p->af_sent_channel ==
+ ieee80211_frequency_to_channel(p2p->remain_on_channel.center_freq))
+ p2p->wait_for_offchan_complete = false;
+ else
+ p2p->wait_for_offchan_complete = true;
+
+ brcmf_dbg(TRACE, "Waiting for %s tx completion event\n",
+ (p2p->wait_for_offchan_complete) ?
+ "off-channel" : "on-channel");
+
timeout = wait_for_completion_timeout(&p2p->send_af_done,
P2P_AF_MAX_WAIT_TIME);
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
index 0e8b34d2d85cb..39f0d02180882 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
@@ -124,6 +124,7 @@ struct afx_hdl {
* @gon_req_action: about to send go negotiation requets frame.
* @block_gon_req_tx: drop tx go negotiation requets frame.
* @p2pdev_dynamically: is p2p device if created by module param or supplicant.
+ * @wait_for_offchan_complete: wait for off-channel tx completion event.
*/
struct brcmf_p2p_info {
struct brcmf_cfg80211_info *cfg;
@@ -144,6 +145,7 @@ struct brcmf_p2p_info {
bool gon_req_action;
bool block_gon_req_tx;
bool p2pdev_dynamically;
+ bool wait_for_offchan_complete;
};
s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced);
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 061/115] qtnfmac: pass sgi rate info flag to wireless core
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (4 preceding siblings ...)
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 060/115] brcmfmac: fix full timeout waiting for action frame on-channel tx Sasha Levin
@ 2019-11-13 1:55 ` Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 062/115] qtnfmac: drop error reports for out-of-bounds key indexes Sasha Levin
` (4 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sergey Matyukevich, Kalle Valo, Sasha Levin, linux-wireless,
netdev
From: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
[ Upstream commit d5657b709e2a92a0e581109010765d1d485580df ]
SGI should be passed to wireless core as a part of rate structure.
Otherwise wireless core performs incorrect rate calculation when
SGI is enabled in hardware but not reported to host.
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/quantenna/qtnfmac/commands.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c
index 4206886b110ce..ed087bbc6f631 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/commands.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c
@@ -485,6 +485,9 @@ qtnf_sta_info_parse_rate(struct rate_info *rate_dst,
rate_dst->flags |= RATE_INFO_FLAGS_MCS;
else if (rate_src->flags & QLINK_STA_INFO_RATE_FLAG_VHT_MCS)
rate_dst->flags |= RATE_INFO_FLAGS_VHT_MCS;
+
+ if (rate_src->flags & QLINK_STA_INFO_RATE_FLAG_SHORT_GI)
+ rate_dst->flags |= RATE_INFO_FLAGS_SHORT_GI;
}
static void
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 062/115] qtnfmac: drop error reports for out-of-bounds key indexes
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (5 preceding siblings ...)
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 061/115] qtnfmac: pass sgi rate info flag to wireless core Sasha Levin
@ 2019-11-13 1:55 ` Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 079/115] iwlwifi: mvm: don't send keys when entering D3 Sasha Levin
` (3 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sergey Matyukevich, Kalle Valo, Sasha Levin, linux-wireless,
netdev
From: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
[ Upstream commit 35da3fe63b8647ce3cc52fccdf186a60710815fb ]
On disconnect wireless core attempts to remove all the supported keys.
Following cfg80211_ops conventions, firmware returns -ENOENT code
for the out-of-bound key indexes. This is a normal behavior,
so no need to report errors for this case.
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
index a450bc6bc7745..d02f68792ce41 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
@@ -509,9 +509,16 @@ static int qtnf_del_key(struct wiphy *wiphy, struct net_device *dev,
int ret;
ret = qtnf_cmd_send_del_key(vif, key_index, pairwise, mac_addr);
- if (ret)
- pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n",
- vif->mac->macid, vif->vifid, key_index, pairwise);
+ if (ret) {
+ if (ret == -ENOENT) {
+ pr_debug("VIF%u.%u: key index %d out of bounds\n",
+ vif->mac->macid, vif->vifid, key_index);
+ } else {
+ pr_err("VIF%u.%u: failed to delete key: idx=%u pw=%u\n",
+ vif->mac->macid, vif->vifid,
+ key_index, pairwise);
+ }
+ }
return ret;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 079/115] iwlwifi: mvm: don't send keys when entering D3
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (6 preceding siblings ...)
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 062/115] qtnfmac: drop error reports for out-of-bounds key indexes Sasha Levin
@ 2019-11-13 1:55 ` Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 107/115] mac80211: minstrel: fix using short preamble CCK rates on HT clients Sasha Levin
` (2 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sara Sharon, Luca Coelho, Sasha Levin, linux-wireless, netdev
From: Sara Sharon <sara.sharon@intel.com>
[ Upstream commit 8c7fd6a365eb5b2647b2c01918730d0a485b9f85 ]
In the past, we needed to program the keys when entering D3. This was
since we replaced the image. However, now that there is a single
image, this is no longer needed. Note that RSC is sent separately in
a new command. This solves issues with newer devices that support PN
offload. Since driver re-sent the keys, the PN got zeroed and the
receiver dropped the next packets, until PN caught up again.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index b205a7bfb828d..65c51c6983288 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -947,8 +947,10 @@ int iwl_mvm_wowlan_config_key_params(struct iwl_mvm *mvm,
{
struct iwl_wowlan_kek_kck_material_cmd kek_kck_cmd = {};
struct iwl_wowlan_tkip_params_cmd tkip_cmd = {};
+ bool unified = fw_has_capa(&mvm->fw->ucode_capa,
+ IWL_UCODE_TLV_CAPA_CNSLDTD_D3_D0_IMG);
struct wowlan_key_data key_data = {
- .configure_keys = !d0i3,
+ .configure_keys = !d0i3 && !unified,
.use_rsc_tsc = false,
.tkip = &tkip_cmd,
.use_tkip = false,
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 107/115] mac80211: minstrel: fix using short preamble CCK rates on HT clients
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (7 preceding siblings ...)
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 079/115] iwlwifi: mvm: don't send keys when entering D3 Sasha Levin
@ 2019-11-13 1:56 ` Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 108/115] mac80211: minstrel: fix CCK rate group streams value Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 109/115] mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode Sasha Levin
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Felix Fietkau, Johannes Berg, Sasha Levin, linux-wireless, netdev
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit 37439f2d6e43ae79e22be9be159f0af157468f82 ]
mi->supported[MINSTREL_CCK_GROUP] needs to be updated
short preamble rates need to be marked as supported regardless of
whether it's currently enabled. Its state can change at any time without
a rate_update call.
Fixes: 782dda00ab8e ("mac80211: minstrel_ht: move short preamble check out of get_rate")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/rc80211_minstrel_ht.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 4a5bdad9f3030..25cb3e5f8b482 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -1132,7 +1132,6 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
u16 sta_cap = sta->ht_cap.cap;
struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
- struct sta_info *sinfo = container_of(sta, struct sta_info, sta);
int use_vht;
int n_supported = 0;
int ack_dur;
@@ -1258,8 +1257,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
if (!n_supported)
goto use_legacy;
- if (test_sta_flag(sinfo, WLAN_STA_SHORT_PREAMBLE))
- mi->cck_supported_short |= mi->cck_supported_short << 4;
+ mi->supported[MINSTREL_CCK_GROUP] |= mi->cck_supported_short << 4;
/* create an initial rate table with the lowest supported rates */
minstrel_ht_update_stats(mp, mi);
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 108/115] mac80211: minstrel: fix CCK rate group streams value
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (8 preceding siblings ...)
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 107/115] mac80211: minstrel: fix using short preamble CCK rates on HT clients Sasha Levin
@ 2019-11-13 1:56 ` Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 109/115] mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode Sasha Levin
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Felix Fietkau, Johannes Berg, Sasha Levin, linux-wireless, netdev
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit 80df9be67c44cb636bbc92caeddad8caf334c53c ]
Fixes a harmless underflow issue when CCK rates are actively being used
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/rc80211_minstrel_ht.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 25cb3e5f8b482..bc97d31907f60 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -129,7 +129,7 @@
#define CCK_GROUP \
[MINSTREL_CCK_GROUP] = { \
- .streams = 0, \
+ .streams = 1, \
.flags = 0, \
.duration = { \
CCK_DURATION_LIST(false), \
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH AUTOSEL 4.14 109/115] mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode
[not found] <20191113015622.11592-1-sashal@kernel.org>
` (9 preceding siblings ...)
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 108/115] mac80211: minstrel: fix CCK rate group streams value Sasha Levin
@ 2019-11-13 1:56 ` Sasha Levin
10 siblings, 0 replies; 11+ messages in thread
From: Sasha Levin @ 2019-11-13 1:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Felix Fietkau, Johannes Berg, Sasha Levin, linux-wireless, netdev
From: Felix Fietkau <nbd@nbd.name>
[ Upstream commit 972b66b86f85f4e8201db454f4c3e9d990cf9836 ]
Long/short preamble selection cannot be sampled separately, since it
depends on the BSS state. Because of that, sampling attempts to
currently not used preamble modes are not counted in the statistics,
which leads to CCK rates being sampled too often.
Fix statistics accounting for long/short preamble by increasing the
index where necessary.
Fix excessive CCK rate sampling by dropping unsupported sample attempts.
This improves throughput on 2.4 GHz channels
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mac80211/rc80211_minstrel_ht.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index bc97d31907f60..e57811e4b91f6 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -282,7 +282,8 @@ minstrel_ht_get_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
break;
/* short preamble */
- if (!(mi->supported[group] & BIT(idx)))
+ if ((mi->supported[group] & BIT(idx + 4)) &&
+ (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE))
idx += 4;
}
return &mi->groups[group].rates[idx];
@@ -1077,18 +1078,23 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
return;
sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES];
+ sample_idx %= MCS_GROUP_RATES;
+
+ if (sample_group == &minstrel_mcs_groups[MINSTREL_CCK_GROUP] &&
+ (sample_idx >= 4) != txrc->short_preamble)
+ return;
+
info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
rate->count = 1;
- if (sample_idx / MCS_GROUP_RATES == MINSTREL_CCK_GROUP) {
+ if (sample_group == &minstrel_mcs_groups[MINSTREL_CCK_GROUP]) {
int idx = sample_idx % ARRAY_SIZE(mp->cck_rates);
rate->idx = mp->cck_rates[idx];
} else if (sample_group->flags & IEEE80211_TX_RC_VHT_MCS) {
ieee80211_rate_set_vht(rate, sample_idx % MCS_GROUP_RATES,
sample_group->streams);
} else {
- rate->idx = sample_idx % MCS_GROUP_RATES +
- (sample_group->streams - 1) * 8;
+ rate->idx = sample_idx + (sample_group->streams - 1) * 8;
}
rate->flags = sample_group->flags;
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-11-13 2:16 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20191113015622.11592-1-sashal@kernel.org>
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 013/115] ath10k: fix vdev-start timeout on error Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 016/115] ath9k: fix reporting calculated new FFT upper max Sasha Levin
2019-11-13 1:54 ` [PATCH AUTOSEL 4.14 019/115] nl80211: Fix a GET_KEY reply attribute Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 059/115] brcmfmac: reduce timeout for action frame scan Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 060/115] brcmfmac: fix full timeout waiting for action frame on-channel tx Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 061/115] qtnfmac: pass sgi rate info flag to wireless core Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 062/115] qtnfmac: drop error reports for out-of-bounds key indexes Sasha Levin
2019-11-13 1:55 ` [PATCH AUTOSEL 4.14 079/115] iwlwifi: mvm: don't send keys when entering D3 Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 107/115] mac80211: minstrel: fix using short preamble CCK rates on HT clients Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 108/115] mac80211: minstrel: fix CCK rate group streams value Sasha Levin
2019-11-13 1:56 ` [PATCH AUTOSEL 4.14 109/115] mac80211: minstrel: fix sampling/reporting of CCK rates in HT mode Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).