mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 02:32:49 -04:00
wifi: rtw89: consider ER SU as a TX capability
ER (Extended Range) SU is to have a larger coverage. We set this as a RA capability, and then firmware can choose ER SU to transmit packets to reception at cell edge. For 8852C, it needs to fill this capability in TXWD, so update rtw89_build_txwd_info0_v1(). Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20221209012110.7242-1-pkshih@realtek.com
This commit is contained in:
@@ -689,7 +689,9 @@ rtw89_core_tx_update_data_info(struct rtw89_dev *rtwdev,
|
||||
struct rtw89_core_tx_request *tx_req)
|
||||
{
|
||||
struct ieee80211_vif *vif = tx_req->vif;
|
||||
struct ieee80211_sta *sta = tx_req->sta;
|
||||
struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
|
||||
struct rtw89_sta *rtwsta = sta_to_rtwsta_safe(sta);
|
||||
struct rtw89_phy_rate_pattern *rate_pattern = &rtwvif->rate_pattern;
|
||||
const struct rtw89_chan *chan = rtw89_chan_get(rtwdev, RTW89_SUB_ENTITY_0);
|
||||
struct rtw89_tx_desc_info *desc_info = &tx_req->desc_info;
|
||||
@@ -707,6 +709,7 @@ rtw89_core_tx_update_data_info(struct rtw89_dev *rtwdev,
|
||||
desc_info->qsel = qsel;
|
||||
desc_info->mac_id = rtw89_core_tx_get_mac_id(rtwdev, tx_req);
|
||||
desc_info->port = desc_info->hiq ? rtwvif->port : 0;
|
||||
desc_info->er_cap = rtwsta ? rtwsta->er_cap : false;
|
||||
|
||||
/* enable wd_info for AMPDU */
|
||||
desc_info->en_wd_info = true;
|
||||
@@ -1006,7 +1009,9 @@ static __le32 rtw89_build_txwd_info0(struct rtw89_tx_desc_info *desc_info)
|
||||
static __le32 rtw89_build_txwd_info0_v1(struct rtw89_tx_desc_info *desc_info)
|
||||
{
|
||||
u32 dword = FIELD_PREP(RTW89_TXWD_INFO0_DISDATAFB, desc_info->dis_data_fb) |
|
||||
FIELD_PREP(RTW89_TXWD_INFO0_MULTIPORT_ID, desc_info->port);
|
||||
FIELD_PREP(RTW89_TXWD_INFO0_MULTIPORT_ID, desc_info->port) |
|
||||
FIELD_PREP(RTW89_TXWD_INFO0_DATA_ER, desc_info->er_cap) |
|
||||
FIELD_PREP(RTW89_TXWD_INFO0_DATA_BW_ER, 0);
|
||||
|
||||
return cpu_to_le32(dword);
|
||||
}
|
||||
@@ -2585,6 +2590,12 @@ int rtw89_core_sta_assoc(struct rtw89_dev *rtwdev,
|
||||
rtw89_mac_bf_monitor_calc(rtwdev, sta, false);
|
||||
|
||||
if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) {
|
||||
struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
|
||||
|
||||
if (bss_conf->he_support &&
|
||||
!(bss_conf->he_oper.params & IEEE80211_HE_OPERATION_ER_SU_DISABLE))
|
||||
rtwsta->er_cap = true;
|
||||
|
||||
rtw89_btc_ntfy_role_info(rtwdev, rtwvif, rtwsta,
|
||||
BTC_ROLE_MSTS_STA_CONN_END);
|
||||
rtw89_core_get_no_ul_ofdma_htc(rtwdev, &rtwsta->htc_template);
|
||||
|
||||
@@ -816,6 +816,7 @@ struct rtw89_tx_desc_info {
|
||||
#define RTW89_MGMT_HW_SEQ_MODE 1
|
||||
bool hiq;
|
||||
u8 port;
|
||||
bool er_cap;
|
||||
};
|
||||
|
||||
struct rtw89_core_tx_request {
|
||||
@@ -2194,6 +2195,7 @@ struct rtw89_sec_cam_entry {
|
||||
struct rtw89_sta {
|
||||
u8 mac_id;
|
||||
bool disassoc;
|
||||
bool er_cap;
|
||||
struct rtw89_dev *rtwdev;
|
||||
struct rtw89_vif *rtwvif;
|
||||
struct rtw89_ra_info ra;
|
||||
|
||||
@@ -367,6 +367,7 @@ static void rtw89_phy_ra_sta_update(struct rtw89_dev *rtwdev,
|
||||
}
|
||||
|
||||
ra->bw_cap = bw_mode;
|
||||
ra->er_cap = rtwsta->er_cap;
|
||||
ra->mode_ctrl = mode;
|
||||
ra->macid = rtwsta->mac_id;
|
||||
ra->stbc_cap = stbc_en;
|
||||
|
||||
@@ -75,7 +75,9 @@
|
||||
#define RTW89_TXWD_INFO0_DATA_BW GENMASK(29, 28)
|
||||
#define RTW89_TXWD_INFO0_GI_LTF GENMASK(27, 25)
|
||||
#define RTW89_TXWD_INFO0_DATA_RATE GENMASK(24, 16)
|
||||
#define RTW89_TXWD_INFO0_DATA_ER BIT(15)
|
||||
#define RTW89_TXWD_INFO0_DISDATAFB BIT(10)
|
||||
#define RTW89_TXWD_INFO0_DATA_BW_ER BIT(8)
|
||||
#define RTW89_TXWD_INFO0_MULTIPORT_ID GENMASK(6, 4)
|
||||
|
||||
/* TX WD INFO DWORD 1 */
|
||||
|
||||
Reference in New Issue
Block a user