|
|
56e3f4 |
From 54a696e53e3265ff849635957429da85977bf707 Mon Sep 17 00:00:00 2001
|
|
|
56e3f4 |
From: =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= <ihuguet@redhat.com>
|
|
|
56e3f4 |
Date: Fri, 21 Jan 2022 08:49:03 +0100
|
|
|
56e3f4 |
Subject: [PATCH 23/36] rtw89: fix sending wrong rtwsta->mac_id to firmware to
|
|
|
56e3f4 |
fill address CAM
|
|
|
56e3f4 |
MIME-Version: 1.0
|
|
|
56e3f4 |
Content-Type: text/plain; charset=UTF-8
|
|
|
56e3f4 |
Content-Transfer-Encoding: 8bit
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Bugzilla: http://bugzilla.redhat.com/2033291
|
|
|
56e3f4 |
|
|
|
56e3f4 |
commit 40822e079011ef8704d429c9d8271000159abffe
|
|
|
56e3f4 |
Author: Ping-Ke Shih <pkshih@realtek.com>
|
|
|
56e3f4 |
Date: Wed Dec 1 16:06:06 2021 +0800
|
|
|
56e3f4 |
|
|
|
56e3f4 |
rtw89: fix sending wrong rtwsta->mac_id to firmware to fill address CAM
|
|
|
56e3f4 |
|
|
|
56e3f4 |
With wrong rtwsta->mac_id, it can't send out ack properly when we receive
|
|
|
56e3f4 |
assoc response occasionally. Then, it failed to connect an AP.
|
|
|
56e3f4 |
|
|
|
56e3f4 |
The cause is that we store 'sta' and use it somewhere. To correct this,
|
|
|
56e3f4 |
remove the variable and use mac_id in drv_priv of 'sta' or 'vif' passed
|
|
|
56e3f4 |
by mac80211.
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
|
|
|
56e3f4 |
Signed-off-by: Kalle Valo <kvalo@kernel.org>
|
|
|
56e3f4 |
Link: https://lore.kernel.org/r/20211201080607.11211-1-pkshih@realtek.com
|
|
|
56e3f4 |
|
|
|
56e3f4 |
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
|
|
|
56e3f4 |
---
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/cam.c | 43 ++++++++++++---------------
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/cam.h | 1 +
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/core.c | 12 ++++----
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/core.h | 19 ++++++------
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/fw.c | 4 +--
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/fw.h | 2 +-
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/mac.c | 4 +--
|
|
|
56e3f4 |
drivers/net/wireless/realtek/rtw89/mac80211.c | 6 ++--
|
|
|
56e3f4 |
8 files changed, 43 insertions(+), 48 deletions(-)
|
|
|
56e3f4 |
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/cam.c b/drivers/net/wireless/realtek/rtw89/cam.c
|
|
|
56e3f4 |
index ce5056ad1e5c..bd34e4bbe107 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/cam.c
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/cam.c
|
|
|
56e3f4 |
@@ -219,6 +219,7 @@ static int rtw89_cam_attach_sec_cam(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct ieee80211_key_conf *key,
|
|
|
56e3f4 |
struct rtw89_sec_cam_entry *sec_cam)
|
|
|
56e3f4 |
{
|
|
|
56e3f4 |
+ struct rtw89_sta *rtwsta = sta_to_rtwsta_safe(sta);
|
|
|
56e3f4 |
struct rtw89_vif *rtwvif;
|
|
|
56e3f4 |
struct rtw89_addr_cam_entry *addr_cam;
|
|
|
56e3f4 |
u8 key_idx = 0;
|
|
|
56e3f4 |
@@ -243,7 +244,7 @@ static int rtw89_cam_attach_sec_cam(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
addr_cam->sec_ent[key_idx] = sec_cam->sec_cam_idx;
|
|
|
56e3f4 |
addr_cam->sec_entries[key_idx] = sec_cam;
|
|
|
56e3f4 |
set_bit(key_idx, addr_cam->sec_cam_map);
|
|
|
56e3f4 |
- ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
|
|
|
56e3f4 |
if (ret) {
|
|
|
56e3f4 |
rtw89_err(rtwdev, "failed to update addr cam sec entry: %d\n",
|
|
|
56e3f4 |
ret);
|
|
|
56e3f4 |
@@ -371,6 +372,7 @@ int rtw89_cam_sec_key_del(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct ieee80211_key_conf *key,
|
|
|
56e3f4 |
bool inform_fw)
|
|
|
56e3f4 |
{
|
|
|
56e3f4 |
+ struct rtw89_sta *rtwsta = sta_to_rtwsta_safe(sta);
|
|
|
56e3f4 |
struct rtw89_cam_info *cam_info = &rtwdev->cam_info;
|
|
|
56e3f4 |
struct rtw89_vif *rtwvif;
|
|
|
56e3f4 |
struct rtw89_addr_cam_entry *addr_cam;
|
|
|
56e3f4 |
@@ -394,7 +396,7 @@ int rtw89_cam_sec_key_del(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
clear_bit(key_idx, addr_cam->sec_cam_map);
|
|
|
56e3f4 |
addr_cam->sec_entries[key_idx] = NULL;
|
|
|
56e3f4 |
if (inform_fw) {
|
|
|
56e3f4 |
- ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
|
|
|
56e3f4 |
if (ret)
|
|
|
56e3f4 |
rtw89_err(rtwdev, "failed to update cam del key: %d\n", ret);
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
@@ -536,12 +538,8 @@ static int rtw89_cam_init_bssid_cam(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
|
|
|
56e3f4 |
void rtw89_cam_bssid_changed(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
|
|
56e3f4 |
{
|
|
|
56e3f4 |
- struct ieee80211_vif *vif = rtwvif_to_vif(rtwvif);
|
|
|
56e3f4 |
- struct rtw89_addr_cam_entry *addr_cam = &rtwvif->addr_cam;
|
|
|
56e3f4 |
struct rtw89_bssid_cam_entry *bssid_cam = &rtwvif->bssid_cam;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
- if (vif->type == NL80211_IFTYPE_STATION)
|
|
|
56e3f4 |
- ether_addr_copy(addr_cam->tma, rtwvif->bssid);
|
|
|
56e3f4 |
ether_addr_copy(bssid_cam->bssid, rtwvif->bssid);
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
@@ -606,17 +604,18 @@ static u8 rtw89_cam_addr_hash(u8 start, const u8 *addr)
|
|
|
56e3f4 |
|
|
|
56e3f4 |
void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct rtw89_vif *rtwvif,
|
|
|
56e3f4 |
+ struct rtw89_sta *rtwsta,
|
|
|
56e3f4 |
const u8 *scan_mac_addr,
|
|
|
56e3f4 |
u8 *cmd)
|
|
|
56e3f4 |
{
|
|
|
56e3f4 |
struct ieee80211_vif *vif = rtwvif_to_vif(rtwvif);
|
|
|
56e3f4 |
- struct ieee80211_sta *sta;
|
|
|
56e3f4 |
- struct rtw89_sta *rtwsta;
|
|
|
56e3f4 |
struct rtw89_addr_cam_entry *addr_cam = &rtwvif->addr_cam;
|
|
|
56e3f4 |
+ struct ieee80211_sta *sta = rtwsta_to_sta_safe(rtwsta);
|
|
|
56e3f4 |
const u8 *sma = scan_mac_addr ? scan_mac_addr : rtwvif->mac_addr;
|
|
|
56e3f4 |
u8 sma_hash, tma_hash, addr_msk_start;
|
|
|
56e3f4 |
u8 sma_start = 0;
|
|
|
56e3f4 |
u8 tma_start = 0;
|
|
|
56e3f4 |
+ u8 *tma = sta ? sta->addr : rtwvif->bssid;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
if (addr_cam->addr_mask != 0) {
|
|
|
56e3f4 |
addr_msk_start = __ffs(addr_cam->addr_mask);
|
|
|
56e3f4 |
@@ -626,7 +625,7 @@ void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
tma_start = addr_msk_start;
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
sma_hash = rtw89_cam_addr_hash(sma_start, sma);
|
|
|
56e3f4 |
- tma_hash = rtw89_cam_addr_hash(tma_start, addr_cam->tma);
|
|
|
56e3f4 |
+ tma_hash = rtw89_cam_addr_hash(tma_start, tma);
|
|
|
56e3f4 |
|
|
|
56e3f4 |
FWCMD_SET_ADDR_IDX(cmd, addr_cam->addr_cam_idx);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_OFFSET(cmd, addr_cam->offset);
|
|
|
56e3f4 |
@@ -651,12 +650,12 @@ void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
FWCMD_SET_ADDR_SMA4(cmd, sma[4]);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_SMA5(cmd, sma[5]);
|
|
|
56e3f4 |
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_TMA0(cmd, addr_cam->tma[0]);
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_TMA1(cmd, addr_cam->tma[1]);
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_TMA2(cmd, addr_cam->tma[2]);
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_TMA3(cmd, addr_cam->tma[3]);
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_TMA4(cmd, addr_cam->tma[4]);
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_TMA5(cmd, addr_cam->tma[5]);
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_TMA0(cmd, tma[0]);
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_TMA1(cmd, tma[1]);
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_TMA2(cmd, tma[2]);
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_TMA3(cmd, tma[3]);
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_TMA4(cmd, tma[4]);
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_TMA5(cmd, tma[5]);
|
|
|
56e3f4 |
|
|
|
56e3f4 |
FWCMD_SET_ADDR_PORT_INT(cmd, rtwvif->port);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_TSF_SYNC(cmd, rtwvif->port);
|
|
|
56e3f4 |
@@ -664,15 +663,11 @@ void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
FWCMD_SET_ADDR_LSIG_TXOP(cmd, rtwvif->lsig_txop);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_TGT_IND(cmd, rtwvif->tgt_ind);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_FRM_TGT_IND(cmd, rtwvif->frm_tgt_ind);
|
|
|
56e3f4 |
-
|
|
|
56e3f4 |
- if (vif->type == NL80211_IFTYPE_STATION) {
|
|
|
56e3f4 |
- sta = rtwvif->mgd.ap;
|
|
|
56e3f4 |
- if (sta) {
|
|
|
56e3f4 |
- rtwsta = (struct rtw89_sta *)sta->drv_priv;
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_MACID(cmd, rtwsta->mac_id);
|
|
|
56e3f4 |
- FWCMD_SET_ADDR_AID12(cmd, vif->bss_conf.aid & 0xfff);
|
|
|
56e3f4 |
- }
|
|
|
56e3f4 |
- }
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_MACID(cmd, rtwsta ? rtwsta->mac_id : rtwvif->mac_id);
|
|
|
56e3f4 |
+ if (rtwvif->net_type == RTW89_NET_TYPE_INFRA)
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_AID12(cmd, vif->bss_conf.aid & 0xfff);
|
|
|
56e3f4 |
+ else if (rtwvif->net_type == RTW89_NET_TYPE_AP_MODE)
|
|
|
56e3f4 |
+ FWCMD_SET_ADDR_AID12(cmd, sta ? sta->aid & 0xfff : 0);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_WOL_PATTERN(cmd, rtwvif->wowlan_pattern);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_WOL_UC(cmd, rtwvif->wowlan_uc);
|
|
|
56e3f4 |
FWCMD_SET_ADDR_WOL_MAGIC(cmd, rtwvif->wowlan_magic);
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/cam.h b/drivers/net/wireless/realtek/rtw89/cam.h
|
|
|
56e3f4 |
index c0f9ef12f530..33a3ad582b81 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/cam.h
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/cam.h
|
|
|
56e3f4 |
@@ -348,6 +348,7 @@ int rtw89_cam_init(struct rtw89_dev *rtwdev, struct rtw89_vif *vif);
|
|
|
56e3f4 |
void rtw89_cam_deinit(struct rtw89_dev *rtwdev, struct rtw89_vif *vif);
|
|
|
56e3f4 |
void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct rtw89_vif *vif,
|
|
|
56e3f4 |
+ struct rtw89_sta *rtwsta,
|
|
|
56e3f4 |
const u8 *scan_mac_addr, u8 *cmd);
|
|
|
56e3f4 |
int rtw89_cam_fill_bssid_cam_info(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct rtw89_vif *vif, u8 *cmd);
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
|
|
|
56e3f4 |
index 2c079388a664..8212496ae9ef 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/core.c
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/core.c
|
|
|
56e3f4 |
@@ -1854,7 +1854,8 @@ int rtw89_core_sta_add(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
ewma_rssi_init(&rtwsta->avg_rssi);
|
|
|
56e3f4 |
|
|
|
56e3f4 |
if (vif->type == NL80211_IFTYPE_STATION) {
|
|
|
56e3f4 |
- rtwvif->mgd.ap = sta;
|
|
|
56e3f4 |
+ /* for station mode, assign the mac_id from itself */
|
|
|
56e3f4 |
+ rtwsta->mac_id = rtwvif->mac_id;
|
|
|
56e3f4 |
rtw89_btc_ntfy_role_info(rtwdev, rtwvif, rtwsta,
|
|
|
56e3f4 |
BTC_ROLE_MSTS_STA_CONN_START);
|
|
|
56e3f4 |
rtw89_chip_rfk_channel(rtwdev);
|
|
|
56e3f4 |
@@ -1880,6 +1881,7 @@ int rtw89_core_sta_disconnect(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct ieee80211_sta *sta)
|
|
|
56e3f4 |
{
|
|
|
56e3f4 |
struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
|
|
|
56e3f4 |
+ struct rtw89_sta *rtwsta = (struct rtw89_sta *)sta->drv_priv;
|
|
|
56e3f4 |
int ret;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
rtw89_mac_bf_monitor_calc(rtwdev, sta, true);
|
|
|
56e3f4 |
@@ -1901,7 +1903,7 @@ int rtw89_core_sta_disconnect(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
/* update cam aid mac_id net_type */
|
|
|
56e3f4 |
- rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
|
|
|
56e3f4 |
if (ret) {
|
|
|
56e3f4 |
rtw89_warn(rtwdev, "failed to send h2c cam\n");
|
|
|
56e3f4 |
return ret;
|
|
|
56e3f4 |
@@ -1926,10 +1928,6 @@ int rtw89_core_sta_assoc(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
return ret;
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
- /* for station mode, assign the mac_id from itself */
|
|
|
56e3f4 |
- if (vif->type == NL80211_IFTYPE_STATION)
|
|
|
56e3f4 |
- rtwsta->mac_id = rtwvif->mac_id;
|
|
|
56e3f4 |
-
|
|
|
56e3f4 |
ret = rtw89_fw_h2c_join_info(rtwdev, rtwvif, 0);
|
|
|
56e3f4 |
if (ret) {
|
|
|
56e3f4 |
rtw89_warn(rtwdev, "failed to send h2c join info\n");
|
|
|
56e3f4 |
@@ -1937,7 +1935,7 @@ int rtw89_core_sta_assoc(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
/* update cam aid mac_id net_type */
|
|
|
56e3f4 |
- rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ rtw89_fw_h2c_cam(rtwdev, rtwvif, rtwsta, NULL);
|
|
|
56e3f4 |
if (ret) {
|
|
|
56e3f4 |
rtw89_warn(rtwdev, "failed to send h2c cam\n");
|
|
|
56e3f4 |
return ret;
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
|
|
|
56e3f4 |
index ef3f5de26f13..7066335adcee 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/core.h
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/core.h
|
|
|
56e3f4 |
@@ -1869,7 +1869,6 @@ struct rtw89_addr_cam_entry {
|
|
|
56e3f4 |
u8 wapi : 1;
|
|
|
56e3f4 |
u8 mask_sel : 2;
|
|
|
56e3f4 |
u8 bssid_cam_idx: 6;
|
|
|
56e3f4 |
- u8 tma[ETH_ALEN];
|
|
|
56e3f4 |
u8 sma[ETH_ALEN];
|
|
|
56e3f4 |
|
|
|
56e3f4 |
u8 sec_ent_mode;
|
|
|
56e3f4 |
@@ -1938,14 +1937,6 @@ struct rtw89_vif {
|
|
|
56e3f4 |
bool wowlan_magic;
|
|
|
56e3f4 |
bool is_hesta;
|
|
|
56e3f4 |
bool last_a_ctrl;
|
|
|
56e3f4 |
- union {
|
|
|
56e3f4 |
- struct {
|
|
|
56e3f4 |
- struct ieee80211_sta *ap;
|
|
|
56e3f4 |
- } mgd;
|
|
|
56e3f4 |
- struct {
|
|
|
56e3f4 |
- struct list_head sta_list;
|
|
|
56e3f4 |
- } ap;
|
|
|
56e3f4 |
- };
|
|
|
56e3f4 |
struct rtw89_addr_cam_entry addr_cam;
|
|
|
56e3f4 |
struct rtw89_bssid_cam_entry bssid_cam;
|
|
|
56e3f4 |
struct ieee80211_tx_queue_params tx_params[IEEE80211_NUM_ACS];
|
|
|
56e3f4 |
@@ -3132,6 +3123,16 @@ static inline struct ieee80211_sta *rtwsta_to_sta(struct rtw89_sta *rtwsta)
|
|
|
56e3f4 |
return container_of(p, struct ieee80211_sta, drv_priv);
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
+static inline struct ieee80211_sta *rtwsta_to_sta_safe(struct rtw89_sta *rtwsta)
|
|
|
56e3f4 |
+{
|
|
|
56e3f4 |
+ return rtwsta ? rtwsta_to_sta(rtwsta) : NULL;
|
|
|
56e3f4 |
+}
|
|
|
56e3f4 |
+
|
|
|
56e3f4 |
+static inline struct rtw89_sta *sta_to_rtwsta_safe(struct ieee80211_sta *sta)
|
|
|
56e3f4 |
+{
|
|
|
56e3f4 |
+ return sta ? (struct rtw89_sta *)sta->drv_priv : NULL;
|
|
|
56e3f4 |
+}
|
|
|
56e3f4 |
+
|
|
|
56e3f4 |
static inline
|
|
|
56e3f4 |
void rtw89_chip_set_channel_prepare(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct rtw89_channel_help_params *p)
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
|
|
|
56e3f4 |
index c9aa86e5d4e4..d4b59fbe7365 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/fw.c
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
|
|
|
56e3f4 |
@@ -524,7 +524,7 @@ void rtw89_unload_firmware(struct rtw89_dev *rtwdev)
|
|
|
56e3f4 |
|
|
|
56e3f4 |
#define H2C_CAM_LEN 60
|
|
|
56e3f4 |
int rtw89_fw_h2c_cam(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
|
|
|
56e3f4 |
- const u8 *scan_mac_addr)
|
|
|
56e3f4 |
+ struct rtw89_sta *rtwsta, const u8 *scan_mac_addr)
|
|
|
56e3f4 |
{
|
|
|
56e3f4 |
struct sk_buff *skb;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
@@ -534,7 +534,7 @@ int rtw89_fw_h2c_cam(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
|
|
|
56e3f4 |
return -ENOMEM;
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
skb_put(skb, H2C_CAM_LEN);
|
|
|
56e3f4 |
- rtw89_cam_fill_addr_cam_info(rtwdev, rtwvif, scan_mac_addr, skb->data);
|
|
|
56e3f4 |
+ rtw89_cam_fill_addr_cam_info(rtwdev, rtwvif, rtwsta, scan_mac_addr, skb->data);
|
|
|
56e3f4 |
rtw89_cam_fill_bssid_cam_info(rtwdev, rtwvif, skb->data);
|
|
|
56e3f4 |
|
|
|
56e3f4 |
rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
|
|
|
56e3f4 |
index 865170a89c4a..2d36dc27222f 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/fw.h
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
|
|
|
56e3f4 |
@@ -1757,7 +1757,7 @@ int rtw89_fw_h2c_assoc_cmac_tbl(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
int rtw89_fw_h2c_txtime_cmac_tbl(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
struct rtw89_sta *rtwsta);
|
|
|
56e3f4 |
int rtw89_fw_h2c_cam(struct rtw89_dev *rtwdev, struct rtw89_vif *vif,
|
|
|
56e3f4 |
- const u8 *scan_mac_addr);
|
|
|
56e3f4 |
+ struct rtw89_sta *rtwsta, const u8 *scan_mac_addr);
|
|
|
56e3f4 |
void rtw89_fw_c2h_irqsafe(struct rtw89_dev *rtwdev, struct sk_buff *c2h);
|
|
|
56e3f4 |
void rtw89_fw_c2h_work(struct work_struct *work);
|
|
|
56e3f4 |
int rtw89_fw_h2c_vif_maintain(struct rtw89_dev *rtwdev,
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
|
|
|
56e3f4 |
index 04c5f9966521..999459489e92 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/mac.c
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
|
|
|
56e3f4 |
@@ -2990,7 +2990,7 @@ int rtw89_mac_vif_init(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
|
|
56e3f4 |
if (ret)
|
|
|
56e3f4 |
return ret;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
- ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL, NULL);
|
|
|
56e3f4 |
if (ret)
|
|
|
56e3f4 |
return ret;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
@@ -3011,7 +3011,7 @@ int rtw89_mac_vif_deinit(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
|
|
|
56e3f4 |
|
|
|
56e3f4 |
rtw89_cam_deinit(rtwdev, rtwvif);
|
|
|
56e3f4 |
|
|
|
56e3f4 |
- ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ ret = rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL, NULL);
|
|
|
56e3f4 |
if (ret)
|
|
|
56e3f4 |
return ret;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
|
|
|
56e3f4 |
index 16381adf006e..757685de6b07 100644
|
|
|
56e3f4 |
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
|
|
|
56e3f4 |
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
|
|
|
56e3f4 |
@@ -336,7 +336,7 @@ static void rtw89_ops_bss_info_changed(struct ieee80211_hw *hw,
|
|
|
56e3f4 |
if (changed & BSS_CHANGED_BSSID) {
|
|
|
56e3f4 |
ether_addr_copy(rtwvif->bssid, conf->bssid);
|
|
|
56e3f4 |
rtw89_cam_bssid_changed(rtwdev, rtwvif);
|
|
|
56e3f4 |
- rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL, NULL);
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
if (changed & BSS_CHANGED_ERP_SLOT)
|
|
|
56e3f4 |
@@ -624,7 +624,7 @@ static void rtw89_ops_sw_scan_start(struct ieee80211_hw *hw,
|
|
|
56e3f4 |
rtw89_btc_ntfy_scan_start(rtwdev, RTW89_PHY_0, hal->current_band_type);
|
|
|
56e3f4 |
rtw89_chip_rfk_scan(rtwdev, true);
|
|
|
56e3f4 |
rtw89_hci_recalc_int_mit(rtwdev);
|
|
|
56e3f4 |
- rtw89_fw_h2c_cam(rtwdev, rtwvif, mac_addr);
|
|
|
56e3f4 |
+ rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL, mac_addr);
|
|
|
56e3f4 |
mutex_unlock(&rtwdev->mutex);
|
|
|
56e3f4 |
}
|
|
|
56e3f4 |
|
|
|
56e3f4 |
@@ -635,7 +635,7 @@ static void rtw89_ops_sw_scan_complete(struct ieee80211_hw *hw,
|
|
|
56e3f4 |
struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
|
|
|
56e3f4 |
|
|
|
56e3f4 |
mutex_lock(&rtwdev->mutex);
|
|
|
56e3f4 |
- rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL);
|
|
|
56e3f4 |
+ rtw89_fw_h2c_cam(rtwdev, rtwvif, NULL, NULL);
|
|
|
56e3f4 |
rtw89_chip_rfk_scan(rtwdev, false);
|
|
|
56e3f4 |
rtw89_btc_ntfy_scan_finish(rtwdev, RTW89_PHY_0);
|
|
|
56e3f4 |
rtwdev->scanning = false;
|
|
|
56e3f4 |
--
|
|
|
56e3f4 |
2.13.6
|
|
|
56e3f4 |
|