forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/net/wireless/ath/wcn36xx/hal.h
....@@ -726,7 +726,137 @@
726726 #define WCN36XX_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102
727727 #define WCN36XX_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103
728728 #define WCN36XX_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104
729
-#define WCN36XX_HAL_CFG_MAX_PARAMS 105
729
+#define WCN36XX_HAL_CFG_ENABLE_NAT_KEEP_ALIVE_FILTER 105
730
+#define WCN36XX_HAL_CFG_ENABLE_SAP_OBSS_PROT 106
731
+#define WCN36XX_HAL_CFG_PSPOLL_DATA_RECEP_TIMEOUT 107
732
+#define WCN36XX_HAL_CFG_TDLS_PUAPSD_BUFFER_STA_CAPABLE 108
733
+#define WCN36XX_HAL_CFG_TDLS_PUAPSD_MASK 109
734
+#define WCN36XX_HAL_CFG_TDLS_PUAPSD_INACTIVITY_TIME 110
735
+#define WCN36XX_HAL_CFG_TDLS_PUAPSD_RX_FRAME_THRESHOLD 111
736
+#define WCN36XX_HAL_CFG_ANTENNA_DIVERSITY 112
737
+#define WCN36XX_HAL_CFG_ATH_DISABLE 113
738
+#define WCN36XX_HAL_CFG_FLEXCONNECT_POWER_FACTOR 114
739
+#define WCN36XX_HAL_CFG_ENABLE_ADAPTIVE_RX_DRAIN 115
740
+#define WCN36XX_HAL_CFG_TDLS_OFF_CHANNEL_CAPABLE 116
741
+#define WCN36XX_HAL_CFG_MWS_COEX_V1_WAN_FREQ 117
742
+#define WCN36XX_HAL_CFG_MWS_COEX_V1_WLAN_FREQ 118
743
+#define WCN36XX_HAL_CFG_MWS_COEX_V1_CONFIG 119
744
+#define WCN36XX_HAL_CFG_MWS_COEX_V1_CONFIG2 120
745
+#define WCN36XX_HAL_CFG_MWS_COEX_V2_WAN_FREQ 121
746
+#define WCN36XX_HAL_CFG_MWS_COEX_V2_WLAN_FREQ 122
747
+#define WCN36XX_HAL_CFG_MWS_COEX_V2_CONFIG 123
748
+#define WCN36XX_HAL_CFG_MWS_COEX_V2_CONFIG2 124
749
+#define WCN36XX_HAL_CFG_MWS_COEX_V3_WAN_FREQ 125
750
+#define WCN36XX_HAL_CFG_MWS_COEX_V3_WLAN_FREQ 126
751
+#define WCN36XX_HAL_CFG_MWS_COEX_V3_CONFIG 127
752
+#define WCN36XX_HAL_CFG_MWS_COEX_V3_CONFIG2 128
753
+#define WCN36XX_HAL_CFG_MWS_COEX_V4_WAN_FREQ 129
754
+#define WCN36XX_HAL_CFG_MWS_COEX_V4_WLAN_FREQ 130
755
+#define WCN36XX_HAL_CFG_MWS_COEX_V4_CONFIG 131
756
+#define WCN36XX_HAL_CFG_MWS_COEX_V4_CONFIG2 132
757
+#define WCN36XX_HAL_CFG_MWS_COEX_V5_WAN_FREQ 133
758
+#define WCN36XX_HAL_CFG_MWS_COEX_V5_WLAN_FREQ 134
759
+#define WCN36XX_HAL_CFG_MWS_COEX_V5_CONFIG 135
760
+#define WCN36XX_HAL_CFG_MWS_COEX_V5_CONFIG2 136
761
+#define WCN36XX_HAL_CFG_MWS_COEX_V6_WAN_FREQ 137
762
+#define WCN36XX_HAL_CFG_MWS_COEX_V6_WLAN_FREQ 138
763
+#define WCN36XX_HAL_CFG_MWS_COEX_V6_CONFIG 139
764
+#define WCN36XX_HAL_CFG_MWS_COEX_V6_CONFIG2 140
765
+#define WCN36XX_HAL_CFG_MWS_COEX_V7_WAN_FREQ 141
766
+#define WCN36XX_HAL_CFG_MWS_COEX_V7_WLAN_FREQ 142
767
+#define WCN36XX_HAL_CFG_MWS_COEX_V7_CONFIG 143
768
+#define WCN36XX_HAL_CFG_MWS_COEX_V7_CONFIG2 144
769
+#define WCN36XX_HAL_CFG_MWS_COEX_V8_WAN_FREQ 145
770
+#define WCN36XX_HAL_CFG_MWS_COEX_V8_WLAN_FREQ 146
771
+#define WCN36XX_HAL_CFG_MWS_COEX_V8_CONFIG 147
772
+#define WCN36XX_HAL_CFG_MWS_COEX_V8_CONFIG2 148
773
+#define WCN36XX_HAL_CFG_MWS_COEX_V9_WAN_FREQ 149
774
+#define WCN36XX_HAL_CFG_MWS_COEX_V9_WLAN_FREQ 150
775
+#define WCN36XX_HAL_CFG_MWS_COEX_V9_CONFIG 151
776
+#define WCN36XX_HAL_CFG_MWS_COEX_V9_CONFIG2 152
777
+#define WCN36XX_HAL_CFG_MWS_COEX_V10_WAN_FREQ 153
778
+#define WCN36XX_HAL_CFG_MWS_COEX_V10_WLAN_FREQ 154
779
+#define WCN36XX_HAL_CFG_MWS_COEX_V10_CONFIG 155
780
+#define WCN36XX_HAL_CFG_MWS_COEX_V10_CONFIG2 156
781
+#define WCN36XX_HAL_CFG_MWS_COEX_MODEM_BACKOFF 157
782
+#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG1 158
783
+#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG2 159
784
+#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG3 160
785
+#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG4 161
786
+#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG5 162
787
+#define WCN36XX_HAL_CFG_MWS_COEX_CONFIG6 163
788
+#define WCN36XX_HAL_CFG_SAR_POWER_BACKOFF 164
789
+#define WCN36XX_HAL_CFG_GO_LINK_MONITOR_TIMEOUT 165
790
+#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_ACTIVE_WLAN_LEN 166
791
+#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_ACTIVE_BT_LEN 167
792
+#define WCN36XX_HAL_CFG_BTC_SAP_STATIC_OPP_ACTIVE_WLAN_LEN 168
793
+#define WCN36XX_HAL_CFG_BTC_SAP_STATIC_OPP_ACTIVE_BT_LEN 169
794
+#define WCN36XX_HAL_CFG_RMC_FIXED_RATE 170
795
+#define WCN36XX_HAL_CFG_ASD_PROBE_INTERVAL 171
796
+#define WCN36XX_HAL_CFG_ASD_TRIGGER_THRESHOLD 172
797
+#define WCN36XX_HAL_CFG_ASD_RTT_RSSI_HYST_THRESHOLD 173
798
+#define WCN36XX_HAL_CFG_BTC_CTS2S_ON_STA_DURING_SCO 174
799
+#define WCN36XX_HAL_CFG_SHORT_PREAMBLE 175
800
+#define WCN36XX_HAL_CFG_SHORT_SLOT_TIME 176
801
+#define WCN36XX_HAL_CFG_DELAYED_BA 177
802
+#define WCN36XX_HAL_CFG_IMMEDIATE_BA 178
803
+#define WCN36XX_HAL_CFG_DOT11_MODE 179
804
+#define WCN36XX_HAL_CFG_HT_CAPS 180
805
+#define WCN36XX_HAL_CFG_AMPDU_PARAMS 181
806
+#define WCN36XX_HAL_CFG_TX_BF_INFO 182
807
+#define WCN36XX_HAL_CFG_ASC_CAP_INFO 183
808
+#define WCN36XX_HAL_CFG_EXT_HT_CAPS 184
809
+#define WCN36XX_HAL_CFG_QOS_ENABLED 185
810
+#define WCN36XX_HAL_CFG_WME_ENABLED 186
811
+#define WCN36XX_HAL_CFG_WSM_ENABLED 187
812
+#define WCN36XX_HAL_CFG_WMM_ENABLED 188
813
+#define WCN36XX_HAL_CFG_UAPSD_PER_AC_BITMASK 189
814
+#define WCN36XX_HAL_CFG_MCS_RATES 190
815
+#define WCN36XX_HAL_CFG_VHT_CAPS 191
816
+#define WCN36XX_HAL_CFG_VHT_RX_SUPP_MCS 192
817
+#define WCN36XX_HAL_CFG_VHT_TX_SUPP_MCS 193
818
+#define WCN36XX_HAL_CFG_RA_FILTER_ENABLE 194
819
+#define WCN36XX_HAL_CFG_RA_RATE_LIMIT_INTERVAL 195
820
+#define WCN36XX_HAL_CFG_BTC_FATAL_HID_NSNIFF_BLK 196
821
+#define WCN36XX_HAL_CFG_BTC_CRITICAL_HID_NSNIFF_BLK 197
822
+#define WCN36XX_HAL_CFG_BTC_DYN_A2DP_TX_QUEUE_THOLD 198
823
+#define WCN36XX_HAL_CFG_BTC_DYN_OPP_TX_QUEUE_THOLD 199
824
+#define WCN36XX_HAL_CFG_LINK_FAIL_TIMEOUT 200
825
+#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_SP 201
826
+#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_RX_CNT 202
827
+#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_TX_CNT 203
828
+#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_RX_CNT_MEAS_WINDOW 204
829
+#define WCN36XX_HAL_CFG_MAX_UAPSD_CONSEC_TX_CNT_MEAS_WINDOW 205
830
+#define WCN36XX_HAL_CFG_MAX_PSPOLL_IN_WMM_UAPSD_PS_MODE 206
831
+#define WCN36XX_HAL_CFG_MAX_UAPSD_INACTIVITY_INTERVALS 207
832
+#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_WMMPS 208
833
+#define WCN36XX_HAL_CFG_BURST_MODE_BE_TXOP_VALUE 209
834
+#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_RA_START_RATE 210
835
+#define WCN36XX_HAL_CFG_BTC_FAST_WLAN_CONN_PREF 211
836
+#define WCN36XX_HAL_CFG_ENABLE_RTSCTS_HTVHT 212
837
+#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_IDLE_WLAN_LEN 213
838
+#define WCN36XX_HAL_CFG_BTC_STATIC_OPP_WLAN_IDLE_BT_LEN 214
839
+#define WCN36XX_HAL_CFG_LINK_FAIL_TX_CNT 215
840
+#define WCN36XX_HAL_CFG_TOGGLE_ARP_BDRATES 216
841
+#define WCN36XX_HAL_CFG_OPTIMIZE_CA_EVENT 217
842
+#define WCN36XX_HAL_CFG_EXT_SCAN_CONC_MODE 218
843
+#define WCN36XX_HAL_CFG_BAR_WAKEUP_HOST_DISABLE 219
844
+#define WCN36XX_HAL_CFG_SAR_BOFFSET_CORRECTION_ENABLE 220
845
+#define WCN36XX_HAL_CFG_UNITS_OF_BCN_WAIT_TIME 221
846
+#define WCN36XX_HAL_CFG_CONS_BCNMISS_COUNT 222
847
+#define WCN36XX_HAL_CFG_BTC_DISABLE_WLAN_LINK_CRITICAL 223
848
+#define WCN36XX_HAL_CFG_DISABLE_SCAN_DURING_SCO 224
849
+#define WCN36XX_HAL_CFG_TRIGGER_NULLFRAME_BEFORE_HB 225
850
+#define WCN36XX_HAL_CFG_ENABLE_POWERSAVE_OFFLOAD 226
851
+#define WCN36XX_HAL_CFG_MAX_PARAMS 227
852
+
853
+/* Specify the starting bitrate, 11B and 11A/G rates can be specified in
854
+ * multiples of 0.5 So for 5.5 mbps => 11. for MCS 0 - 7 rates, Bit 7 should
855
+ * set to 1 and Bit 0-6 represent the MCS index. so for MCS2 => 130.
856
+ * Any invalid non-zero value or unsupported rate will set the start rate
857
+ * to 6 mbps.
858
+ */
859
+#define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_RA_START_RATE 210
730860
731861 /* Message definitons - All the messages below need to be packed */
732862
....@@ -1405,6 +1535,76 @@
14051535 struct wcn36xx_hal_config_sta_params sta_params;
14061536 } __packed;
14071537
1538
+struct wcn36xx_hal_supported_rates_v1 {
1539
+ /* For Self STA Entry: this represents Self Mode.
1540
+ * For Peer Stations, this represents the mode of the peer.
1541
+ * On Station:
1542
+ *
1543
+ * --this mode is updated when PE adds the Self Entry.
1544
+ *
1545
+ * -- OR when PE sends 'ADD_BSS' message and station context in BSS
1546
+ * is used to indicate the mode of the AP.
1547
+ *
1548
+ * ON AP:
1549
+ *
1550
+ * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry
1551
+ * for that BSS is used to indicate the self mode of the AP.
1552
+ *
1553
+ * -- OR when a station is associated, PE sends 'ADD_STA' message
1554
+ * with this mode updated.
1555
+ */
1556
+
1557
+ enum sta_rate_mode op_rate_mode;
1558
+
1559
+ /* 11b, 11a and aniLegacyRates are IE rates which gives rate in
1560
+ * unit of 500Kbps
1561
+ */
1562
+ u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
1563
+ u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
1564
+ u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
1565
+ u16 reserved;
1566
+
1567
+ /* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be
1568
+ * supported) First 26 bits are reserved for those Titan rates and
1569
+ * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
1570
+ * reserved
1571
+ * Titan and Taurus Rates
1572
+ */
1573
+ u32 enhanced_rate_bitmap;
1574
+
1575
+ /* 0-76 bits used, remaining reserved
1576
+ * bits 0-15 and 32 should be set.
1577
+ */
1578
+ u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];
1579
+
1580
+ /* RX Highest Supported Data Rate defines the highest data
1581
+ * rate that the STA is able to receive, in unites of 1Mbps.
1582
+ * This value is derived from "Supported MCS Set field" inside
1583
+ * the HT capability element.
1584
+ */
1585
+ u16 rx_highest_data_rate;
1586
+
1587
+ /* Indicates the Maximum MCS that can be received for each spatial
1588
+ * stream.
1589
+ */
1590
+ u16 vht_rx_mcs_map;
1591
+
1592
+ /* Indicates the highest VHT data rate that the STA is able to
1593
+ * receive.
1594
+ */
1595
+ u16 vht_rx_highest_data_rate;
1596
+
1597
+ /* Indicates the Maximum MCS that can be transmitted for each spatial
1598
+ * stream.
1599
+ */
1600
+ u16 vht_tx_mcs_map;
1601
+
1602
+ /* Indicates the highest VHT data rate that the STA is able to
1603
+ * transmit.
1604
+ */
1605
+ u16 vht_tx_highest_data_rate;
1606
+} __packed;
1607
+
14081608 struct wcn36xx_hal_config_sta_params_v1 {
14091609 /* BSSID of STA */
14101610 u8 bssid[ETH_ALEN];
....@@ -1507,11 +1707,21 @@
15071707 u8 p2p;
15081708
15091709 /* Reserved to align next field on a dword boundary */
1510
- u8 reserved;
1710
+ u8 ht_ldpc_enabled:1;
1711
+ u8 vht_ldpc_enabled:1;
1712
+ u8 vht_tx_bf_enabled:1;
1713
+ u8 vht_tx_mu_beamformee_capable:1;
1714
+ u8 reserved:4;
15111715
15121716 /* These rates are the intersection of peer and self capabilities. */
1513
- struct wcn36xx_hal_supported_rates supported_rates;
1717
+ struct wcn36xx_hal_supported_rates_v1 supported_rates;
1718
+
1719
+ u8 vht_capable;
1720
+ u8 vht_tx_channel_width_set;
1721
+
15141722 } __packed;
1723
+
1724
+#define WCN36XX_DIFF_STA_PARAMS_V1_NOVHT 10
15151725
15161726 struct wcn36xx_hal_config_sta_req_msg_v1 {
15171727 struct wcn36xx_hal_msg_header header;
....@@ -1933,7 +2143,13 @@
19332143 * "STA context"
19342144 */
19352145 struct wcn36xx_hal_config_sta_params_v1 sta;
2146
+
2147
+ u8 vht_capable;
2148
+ u8 vht_tx_channel_width_set;
2149
+
19362150 } __packed;
2151
+
2152
+#define WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT (WCN36XX_DIFF_STA_PARAMS_V1_NOVHT + 2)
19372153
19382154 struct wcn36xx_hal_config_bss_req_msg_v1 {
19392155 struct wcn36xx_hal_msg_header header;
....@@ -2091,7 +2307,7 @@
20912307 /*
20922308 * This is used configure the key information on a given station.
20932309 * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate
2094
- * a preconfigured key from a BSS the station assoicated with; otherwise
2310
+ * a preconfigured key from a BSS the station associated with; otherwise
20952311 * a new key descriptor is created based on the key field.
20962312 */
20972313 struct wcn36xx_hal_set_sta_key_req_msg {
....@@ -2240,7 +2456,7 @@
22402456 struct wcn36xx_hal_msg_header header;
22412457
22422458 /* Actual FTM Command body */
2243
- u8 ptt_msg[0];
2459
+ u8 ptt_msg[];
22442460 } __packed;
22452461
22462462 struct wcn36xx_hal_process_ptt_msg_rsp_msg {
....@@ -2249,7 +2465,7 @@
22492465 /* FTM Command response status */
22502466 u32 ptt_msg_resp_status;
22512467 /* Actual FTM Command body */
2252
- u8 ptt_msg[0];
2468
+ u8 ptt_msg[];
22532469 } __packed;
22542470
22552471 struct update_edca_params_req_msg {