mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 03:13:17 +00:00
43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
From 004a04c391c7ec97b027d569f8b12c036451f6db Mon Sep 17 00:00:00 2001
|
|
From: Aaradhana Sahu <quic_aarasahu@quicinc.com>
|
|
Date: Tue, 18 Apr 2023 11:55:42 +0530
|
|
Subject: [PATCH] cfg80211: Fix firmware assert during set bitrate command
|
|
|
|
eht_set_mcs_mask/he_set_mcs_mask function update mcs mask according
|
|
to user input value. When we are running set bitrate command without
|
|
giving MCS NSS in this condition mcs mask value is zero due to this
|
|
driver not able to find correct phymode and trigger firmware assert.
|
|
|
|
Fix this issue by returning default value of mcs_mask (which is filling
|
|
in nl80211_parse_tx_bitrate_mask function) for 6G band while running
|
|
following command:
|
|
iw dev wlanx set bitrates eht-mcs-6/he-mcs-6
|
|
|
|
Signed-off-by: Aaradhana Sahu <quic_aarasahu@quicinc.com>
|
|
---
|
|
net/wireless/nl80211.c | 19 +++++++++++++++++--
|
|
1 file changed, 17 insertions(+), 2 deletions(-)
|
|
|
|
--- a/net/wireless/nl80211.c
|
|
+++ b/net/wireless/nl80211.c
|
|
@@ -5465,6 +5465,7 @@ static int eht_build_mcs_mask(struct gen
|
|
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
|
u8 mcs_nss_len, nss, mcs_7 = 0, mcs_9 = 0, mcs_11 = 0, mcs_13 = 0;
|
|
bool mcs_14 = false, mcs_15 = false;
|
|
+ unsigned int link_id = nl80211_link_id(info->attrs);
|
|
|
|
mcs_nss_len = ieee80211_eht_mcs_nss_size(&he_cap->he_cap_elem,
|
|
&eht_cap->eht_cap_elem);
|
|
@@ -5491,7 +5492,10 @@ static int eht_build_mcs_mask(struct gen
|
|
|
|
switch (wdev->iftype) {
|
|
case NL80211_IFTYPE_AP:
|
|
- width = wdev->u.ap.preset_chandef.width;
|
|
+ if (wdev->valid_links)
|
|
+ width = wdev->links[link_id].ap.chandef.width;
|
|
+ else
|
|
+ width = wdev->u.ap.preset_chandef.width;
|
|
break;
|
|
case NL80211_IFTYPE_MESH_POINT:
|
|
width = wdev->u.mesh.chandef.width;
|