Skip to content

Commit 1d7f514

Browse files
Baochen Qiangkvalo
authored andcommitted
ath11k: Designating channel frequency when sending management frames
In case of Passpoint, the WLAN interface may be requested to remain on a specific channel and then to send some management frames on that channel. Now chanfreq of wmi_mgmt_send_cmd is set as 0, as a result firmware may choose a default but wrong channel. Fix it by assigning chanfreq field with the designated channel. This change only applies to WCN6855 and QCA6390, other chips are not affected. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Baochen Qiang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 355333a commit 1d7f514

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

drivers/net/wireless/ath/ath11k/core.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
110110
.dp_window_idx = 0,
111111
.ce_window_idx = 0,
112112
.fixed_fw_mem = false,
113+
.support_off_channel_tx = false,
113114
},
114115
{
115116
.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -185,6 +186,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
185186
.dp_window_idx = 0,
186187
.ce_window_idx = 0,
187188
.fixed_fw_mem = false,
189+
.support_off_channel_tx = false,
188190
},
189191
{
190192
.name = "qca6390 hw2.0",
@@ -259,6 +261,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
259261
.dp_window_idx = 0,
260262
.ce_window_idx = 0,
261263
.fixed_fw_mem = false,
264+
.support_off_channel_tx = true,
262265
},
263266
{
264267
.name = "qcn9074 hw1.0",
@@ -333,6 +336,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
333336
.dp_window_idx = 3,
334337
.ce_window_idx = 2,
335338
.fixed_fw_mem = false,
339+
.support_off_channel_tx = false,
336340
},
337341
{
338342
.name = "wcn6855 hw2.0",
@@ -407,6 +411,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
407411
.dp_window_idx = 0,
408412
.ce_window_idx = 0,
409413
.fixed_fw_mem = false,
414+
.support_off_channel_tx = true,
410415
},
411416
{
412417
.name = "wcn6855 hw2.1",
@@ -480,6 +485,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
480485
.dp_window_idx = 0,
481486
.ce_window_idx = 0,
482487
.fixed_fw_mem = false,
488+
.support_off_channel_tx = true,
483489
},
484490
{
485491
.name = "wcn6750 hw1.0",
@@ -553,6 +559,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
553559
.dp_window_idx = 1,
554560
.ce_window_idx = 2,
555561
.fixed_fw_mem = true,
562+
.support_off_channel_tx = false,
556563
},
557564
};
558565

drivers/net/wireless/ath/ath11k/hw.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ struct ath11k_hw_params {
204204
u8 dp_window_idx;
205205
u8 ce_window_idx;
206206
bool fixed_fw_mem;
207+
bool support_off_channel_tx;
207208
};
208209

209210
struct ath11k_hw_ops {

drivers/net/wireless/ath/ath11k/wmi.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,25 @@ struct sk_buff *ath11k_wmi_alloc_skb(struct ath11k_wmi_base *wmi_sc, u32 len)
625625
return skb;
626626
}
627627

628+
static u32 ath11k_wmi_mgmt_get_freq(struct ath11k *ar,
629+
struct ieee80211_tx_info *info)
630+
{
631+
struct ath11k_base *ab = ar->ab;
632+
u32 freq = 0;
633+
634+
if (ab->hw_params.support_off_channel_tx &&
635+
ar->scan.is_roc &&
636+
(info->flags & IEEE80211_TX_CTL_TX_OFFCHAN))
637+
freq = ar->scan.roc_freq;
638+
639+
return freq;
640+
}
641+
628642
int ath11k_wmi_mgmt_send(struct ath11k *ar, u32 vdev_id, u32 buf_id,
629643
struct sk_buff *frame)
630644
{
631645
struct ath11k_pdev_wmi *wmi = ar->wmi;
646+
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(frame);
632647
struct wmi_mgmt_send_cmd *cmd;
633648
struct wmi_tlv *frame_tlv;
634649
struct sk_buff *skb;
@@ -649,7 +664,7 @@ int ath11k_wmi_mgmt_send(struct ath11k *ar, u32 vdev_id, u32 buf_id,
649664
FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
650665
cmd->vdev_id = vdev_id;
651666
cmd->desc_id = buf_id;
652-
cmd->chanfreq = 0;
667+
cmd->chanfreq = ath11k_wmi_mgmt_get_freq(ar, info);
653668
cmd->paddr_lo = lower_32_bits(ATH11K_SKB_CB(frame)->paddr);
654669
cmd->paddr_hi = upper_32_bits(ATH11K_SKB_CB(frame)->paddr);
655670
cmd->frame_len = frame->len;

0 commit comments

Comments
 (0)