forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/rsi/rsi_main.h
....@@ -112,8 +112,12 @@
112112 #define RSI_WOW_ENABLED BIT(0)
113113 #define RSI_WOW_NO_CONNECTION BIT(1)
114114
115
-#define RSI_DEV_9113 1
116115 #define RSI_MAX_RX_PKTS 64
116
+
117
+enum rsi_dev_model {
118
+ RSI_DEV_9113 = 0,
119
+ RSI_DEV_9116
120
+};
117121
118122 struct version_info {
119123 u16 major;
....@@ -165,6 +169,24 @@
165169 u32 total_tx_pkt_freed[NUM_EDCA_QUEUES + 2];
166170 };
167171
172
+#define MAX_BGSCAN_CHANNELS_DUAL_BAND 38
173
+#define MAX_BGSCAN_PROBE_REQ_LEN 0x64
174
+#define RSI_DEF_BGSCAN_THRLD 0x0
175
+#define RSI_DEF_ROAM_THRLD 0xa
176
+#define RSI_BGSCAN_PERIODICITY 0x1e
177
+#define RSI_ACTIVE_SCAN_TIME 0x14
178
+#define RSI_PASSIVE_SCAN_TIME 0x46
179
+#define RSI_CHANNEL_SCAN_TIME 20
180
+struct rsi_bgscan_params {
181
+ u16 bgscan_threshold;
182
+ u16 roam_threshold;
183
+ u16 bgscan_periodicity;
184
+ u8 num_bgscan_channels;
185
+ u8 two_probe;
186
+ u16 active_scan_duration;
187
+ u16 passive_scan_duration;
188
+};
189
+
168190 struct vif_priv {
169191 bool is_ht;
170192 bool sgi;
....@@ -196,6 +218,17 @@
196218 RSI_REGION_ETSI,
197219 RSI_REGION_TELEC,
198220 RSI_REGION_WORLD
221
+};
222
+
223
+struct rsi_9116_features {
224
+ u8 pll_mode;
225
+ u8 rf_type;
226
+ u8 wireless_mode;
227
+ u8 afe_type;
228
+ u8 enable_ppe;
229
+ u8 dpd;
230
+ u32 sifs_tx_enable;
231
+ u32 ps_options;
199232 };
200233
201234 struct rsi_rate_config {
....@@ -296,6 +329,12 @@
296329 bool eapol4_confirm;
297330 bool bt_defer_attach;
298331 void *bt_adapter;
332
+
333
+ struct cfg80211_scan_request *hwscan;
334
+ struct rsi_bgscan_params bgscan;
335
+ struct rsi_9116_features w9116_features;
336
+ u8 bgscan_en;
337
+ u8 mac_ops_resumed;
299338 };
300339
301340 struct eepromrw_info {
....@@ -313,7 +352,7 @@
313352
314353 struct rsi_hw {
315354 struct rsi_common *priv;
316
- u8 device_model;
355
+ enum rsi_dev_model device_model;
317356 struct ieee80211_hw *hw;
318357 struct ieee80211_vif *vifs[RSI_MAX_VIFS];
319358 struct ieee80211_tx_queue_params edca_params[NUM_EDCA_QUEUES];
....@@ -365,6 +404,7 @@
365404 u32 instructions_size, u16 block_size,
366405 u8 *fw);
367406 int (*reinit_device)(struct rsi_hw *adapter);
407
+ int (*ta_reset)(struct rsi_hw *adapter);
368408 };
369409
370410 enum rsi_host_intf rsi_get_host_intf(void *priv);