Skip to content

Commit

Permalink
rtw88: Fix incorrect beamformee role setting
Browse files Browse the repository at this point in the history
In associating and configuring beamformee, bfee->role is not
correctly set before rtw_chip_ops::config_bfee().
Fix it by setting it correctly.

Signed-off-by: Tzu-En Huang <[email protected]>
Signed-off-by: Yan-Hsuan Chuang <[email protected]>
Reviewed-by: Chris Chiu <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
  • Loading branch information
Tzu-En Huang authored and Kalle Valo committed Feb 13, 2020
1 parent d49f2c5 commit aa7619a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/realtek/rtw88/bf.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
struct ieee80211_sta_vht_cap *ic_vht_cap;
const u8 *bssid = bss_conf->bssid;
u32 sound_dim;
u8 bfee_role = RTW_BFEE_NONE;
u8 i;

if (!(chip->band & RTW_BAND_5G))
Expand All @@ -67,7 +66,7 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
}

ether_addr_copy(bfee->mac_addr, bssid);
bfee_role = RTW_BFEE_MU;
bfee->role = RTW_BFEE_MU;
bfee->p_aid = (bssid[5] << 1) | (bssid[4] >> 7);
bfee->aid = bss_conf->aid;
bfinfo->bfer_mu_cnt++;
Expand All @@ -85,7 +84,7 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
sound_dim >>= IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT;

ether_addr_copy(bfee->mac_addr, bssid);
bfee_role = RTW_BFEE_SU;
bfee->role = RTW_BFEE_SU;
bfee->sound_dim = (u8)sound_dim;
bfee->g_id = 0;
bfee->p_aid = (bssid[5] << 1) | (bssid[4] >> 7);
Expand All @@ -102,7 +101,6 @@ void rtw_bf_assoc(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
}

out_unlock:
bfee->role = bfee_role;
rcu_read_unlock();
}

Expand Down

0 comments on commit aa7619a

Please sign in to comment.