Skip to content

Commit 9bb762b

Browse files
airtower-lunaKalle Valo
authored andcommitted
wifi: rtw88: Add definitions for 8703b chip
default_cck_index is used in power track, the rx_cck_agc_report_type for RX PHY status. GET_RX_DESC_BW is an RX descriptor field not used by the other chip drivers. Acked-by: Ping-Ke Shih <[email protected]> Tested-by: Pavel Machek <[email protected]> Signed-off-by: Fiona Klute <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://msgid.link/[email protected]
1 parent da2abdc commit 9bb762b

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

drivers/net/wireless/realtek/rtw88/main.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ enum rtw_chip_type {
187187
RTW_CHIP_TYPE_8822C,
188188
RTW_CHIP_TYPE_8723D,
189189
RTW_CHIP_TYPE_8821C,
190+
RTW_CHIP_TYPE_8703B,
190191
};
191192

192193
enum rtw_tx_queue_type {
@@ -1700,11 +1701,13 @@ struct rtw_dm_info {
17001701
s8 delta_power_index[RTW_RF_PATH_MAX];
17011702
s8 delta_power_index_last[RTW_RF_PATH_MAX];
17021703
u8 default_ofdm_index;
1704+
u8 default_cck_index;
17031705
bool pwr_trk_triggered;
17041706
bool pwr_trk_init_trigger;
17051707
struct ewma_thermal avg_thermal[RTW_RF_PATH_MAX];
17061708
s8 txagc_remnant_cck;
17071709
s8 txagc_remnant_ofdm;
1710+
u8 rx_cck_agc_report_type;
17081711

17091712
/* backup dack results for each path and I/Q */
17101713
u32 dack_adck[RTW_RF_PATH_MAX];

drivers/net/wireless/realtek/rtw88/rtw8723x.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ extern const struct rtw8723x_common rtw8723x_common;
165165
#define MAX_TOLERANCE 5
166166
#define IQK_TX_X_ERR 0x142
167167
#define IQK_TX_Y_ERR 0x42
168+
#define IQK_RX_X_ERR 0x132
169+
#define IQK_RX_Y_ERR 0x36
168170
#define IQK_RX_X_UPPER 0x11a
169171
#define IQK_RX_X_LOWER 0xe6
170172
#define IQK_RX_Y_LMT 0x1a
@@ -177,6 +179,10 @@ extern const struct rtw8723x_common rtw8723x_common;
177179
#define DIS_3WIRE 0xccf000c0
178180
#define EN_3WIRE 0xccc000c0
179181
#define START_PSD 0x400000
182+
#define FREQ_CH5 0xfccd
183+
#define FREQ_CH6 0xfc4d
184+
#define FREQ_CH7 0xffcd
185+
#define FREQ_CH8 0xff4d
180186
#define FREQ_CH13 0xfccd
181187
#define FREQ_CH14 0xff9a
182188
#define RFCFGCH_CHANNEL_MASK GENMASK(7, 0)
@@ -239,10 +245,13 @@ extern const struct rtw8723x_common rtw8723x_common;
239245
#define BIT_MASK_OFDM0_EXT_C BIT(29)
240246
#define BIT_MASK_OFDM0_EXTS (BIT(31) | BIT(29) | BIT(28))
241247
#define BIT_SET_OFDM0_EXTS(a, c, d) (((a) << 31) | ((c) << 29) | ((d) << 28))
248+
#define BIT_MASK_OFDM0_EXTS_B (BIT(27) | BIT(25) | BIT(24))
249+
#define BIT_SET_OFDM0_EXTS_B(a, c, d) (((a) << 27) | ((c) << 25) | ((d) << 24))
242250
#define REG_OFDM0_XAAGC1 0x0c50
243251
#define REG_OFDM0_XBAGC1 0x0c58
244252
#define REG_AGCRSSI 0x0c78
245253
#define REG_OFDM_0_XA_TX_IQ_IMBALANCE 0x0c80
254+
#define REG_OFDM_0_XB_TX_IQ_IMBALANCE 0x0c88
246255
#define BIT_MASK_TXIQ_ELM_A 0x03ff
247256
#define BIT_SET_TXIQ_ELM_ACD(a, c, d) (((d) << 22) | (((c) & 0x3F) << 16) | \
248257
((a) & 0x03ff))
@@ -303,6 +312,8 @@ extern const struct rtw8723x_common rtw8723x_common;
303312
#define REG_IQK_AGC_RSP_11N 0x0e4c
304313
#define REG_TX_IQK_TONE_B 0x0e50
305314
#define REG_RX_IQK_TONE_B 0x0e54
315+
#define REG_TXIQK_PI_B 0x0e58
316+
#define REG_RXIQK_PI_B 0x0e5c
306317
#define REG_IQK_RES_TX 0x0e94
307318
#define BIT_MASK_RES_TX GENMASK(25, 16)
308319
#define REG_IQK_RES_TY 0x0e9c

drivers/net/wireless/realtek/rtw88/rx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ enum rtw_rx_desc_enc {
4040
le32_get_bits(*((__le32 *)(rxdesc) + 0x02), GENMASK(30, 29))
4141
#define GET_RX_DESC_TSFL(rxdesc) \
4242
le32_get_bits(*((__le32 *)(rxdesc) + 0x05), GENMASK(31, 0))
43+
#define GET_RX_DESC_BW(rxdesc) \
44+
(le32_get_bits(*((__le32 *)(rxdesc) + 0x04), GENMASK(31, 24)))
4345

4446
void rtw_rx_stats(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
4547
struct sk_buff *skb);

0 commit comments

Comments
 (0)