diff options
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac/qlink.h')
| -rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/qlink.h | 138 |
1 files changed, 77 insertions, 61 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/qlink.h b/drivers/net/wireless/quantenna/qtnfmac/qlink.h index 0f582782682f..a432fb001c41 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/qlink.h +++ b/drivers/net/wireless/quantenna/qtnfmac/qlink.h | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | 19 | ||
| 20 | #include <linux/ieee80211.h> | 20 | #include <linux/ieee80211.h> |
| 21 | 21 | ||
| 22 | #define QLINK_PROTO_VER 5 | 22 | #define QLINK_PROTO_VER 6 |
| 23 | 23 | ||
| 24 | #define QLINK_MACID_RSVD 0xFF | 24 | #define QLINK_MACID_RSVD 0xFF |
| 25 | #define QLINK_VIFID_RSVD 0xFF | 25 | #define QLINK_VIFID_RSVD 0xFF |
| @@ -74,12 +74,6 @@ enum qlink_hw_capab { | |||
| 74 | QLINK_HW_CAPAB_STA_INACT_TIMEOUT = BIT(1), | 74 | QLINK_HW_CAPAB_STA_INACT_TIMEOUT = BIT(1), |
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | enum qlink_phy_mode { | ||
| 78 | QLINK_PHYMODE_BGN = BIT(0), | ||
| 79 | QLINK_PHYMODE_AN = BIT(1), | ||
| 80 | QLINK_PHYMODE_AC = BIT(2), | ||
| 81 | }; | ||
| 82 | |||
| 83 | enum qlink_iface_type { | 77 | enum qlink_iface_type { |
| 84 | QLINK_IFTYPE_AP = 1, | 78 | QLINK_IFTYPE_AP = 1, |
| 85 | QLINK_IFTYPE_STATION = 2, | 79 | QLINK_IFTYPE_STATION = 2, |
| @@ -154,9 +148,9 @@ struct qlink_auth_encr { | |||
| 154 | __le16 control_port_ethertype; | 148 | __le16 control_port_ethertype; |
| 155 | u8 auth_type; | 149 | u8 auth_type; |
| 156 | u8 privacy; | 150 | u8 privacy; |
| 157 | u8 mfp; | ||
| 158 | u8 control_port; | 151 | u8 control_port; |
| 159 | u8 control_port_no_encrypt; | 152 | u8 control_port_no_encrypt; |
| 153 | u8 rsvd[2]; | ||
| 160 | } __packed; | 154 | } __packed; |
| 161 | 155 | ||
| 162 | /* QLINK Command messages related definitions | 156 | /* QLINK Command messages related definitions |
| @@ -168,11 +162,12 @@ struct qlink_auth_encr { | |||
| 168 | * Commands are QLINK messages of type @QLINK_MSG_TYPE_CMD, sent by driver to | 162 | * Commands are QLINK messages of type @QLINK_MSG_TYPE_CMD, sent by driver to |
| 169 | * wireless network device for processing. Device is expected to send back a | 163 | * wireless network device for processing. Device is expected to send back a |
| 170 | * reply message of type &QLINK_MSG_TYPE_CMDRSP, containing at least command | 164 | * reply message of type &QLINK_MSG_TYPE_CMDRSP, containing at least command |
| 171 | * execution status (one of &enum qlink_cmd_result) at least. Reply message | 165 | * execution status (one of &enum qlink_cmd_result). Reply message |
| 172 | * may also contain data payload specific to the command type. | 166 | * may also contain data payload specific to the command type. |
| 173 | * | 167 | * |
| 174 | * @QLINK_CMD_CHANS_INFO_GET: for the specified MAC and specified band, get | 168 | * @QLINK_CMD_BAND_INFO_GET: for the specified MAC and specified band, get |
| 175 | * number of operational channels and information on each of the channel. | 169 | * the band's description including number of operational channels and |
| 170 | * info on each channel, HT/VHT capabilities, supported rates etc. | ||
| 176 | * This command is generic to a specified MAC, interface index must be set | 171 | * This command is generic to a specified MAC, interface index must be set |
| 177 | * to QLINK_VIFID_RSVD in command header. | 172 | * to QLINK_VIFID_RSVD in command header. |
| 178 | * @QLINK_CMD_REG_NOTIFY: notify device about regulatory domain change. This | 173 | * @QLINK_CMD_REG_NOTIFY: notify device about regulatory domain change. This |
| @@ -194,10 +189,9 @@ enum qlink_cmd_type { | |||
| 194 | QLINK_CMD_CHANGE_INTF = 0x0017, | 189 | QLINK_CMD_CHANGE_INTF = 0x0017, |
| 195 | QLINK_CMD_UPDOWN_INTF = 0x0018, | 190 | QLINK_CMD_UPDOWN_INTF = 0x0018, |
| 196 | QLINK_CMD_REG_NOTIFY = 0x0019, | 191 | QLINK_CMD_REG_NOTIFY = 0x0019, |
| 197 | QLINK_CMD_CHANS_INFO_GET = 0x001A, | 192 | QLINK_CMD_BAND_INFO_GET = 0x001A, |
| 198 | QLINK_CMD_CHAN_SWITCH = 0x001B, | 193 | QLINK_CMD_CHAN_SWITCH = 0x001B, |
| 199 | QLINK_CMD_CHAN_GET = 0x001C, | 194 | QLINK_CMD_CHAN_GET = 0x001C, |
| 200 | QLINK_CMD_CONFIG_AP = 0x0020, | ||
| 201 | QLINK_CMD_START_AP = 0x0021, | 195 | QLINK_CMD_START_AP = 0x0021, |
| 202 | QLINK_CMD_STOP_AP = 0x0022, | 196 | QLINK_CMD_STOP_AP = 0x0022, |
| 203 | QLINK_CMD_GET_STA_INFO = 0x0030, | 197 | QLINK_CMD_GET_STA_INFO = 0x0030, |
| @@ -304,21 +298,6 @@ struct qlink_cmd_mgmt_frame_tx { | |||
| 304 | } __packed; | 298 | } __packed; |
| 305 | 299 | ||
| 306 | /** | 300 | /** |
| 307 | * struct qlink_cmd_mgmt_append_ie - data for QLINK_CMD_MGMT_SET_APPIE command | ||
| 308 | * | ||
| 309 | * @type: type of MGMT frame to appent requested IEs to, one of | ||
| 310 | * &enum qlink_mgmt_frame_type. | ||
| 311 | * @flags: for future use. | ||
| 312 | * @ie_data: IEs data to append. | ||
| 313 | */ | ||
| 314 | struct qlink_cmd_mgmt_append_ie { | ||
| 315 | struct qlink_cmd chdr; | ||
| 316 | u8 type; | ||
| 317 | u8 flags; | ||
| 318 | u8 ie_data[0]; | ||
| 319 | } __packed; | ||
| 320 | |||
| 321 | /** | ||
| 322 | * struct qlink_cmd_get_sta_info - data for QLINK_CMD_GET_STA_INFO command | 301 | * struct qlink_cmd_get_sta_info - data for QLINK_CMD_GET_STA_INFO command |
| 323 | * | 302 | * |
| 324 | * @sta_addr: MAC address of the STA statistics is requested for. | 303 | * @sta_addr: MAC address of the STA statistics is requested for. |
| @@ -425,20 +404,36 @@ enum qlink_sta_connect_flags { | |||
| 425 | /** | 404 | /** |
| 426 | * struct qlink_cmd_connect - data for QLINK_CMD_CONNECT command | 405 | * struct qlink_cmd_connect - data for QLINK_CMD_CONNECT command |
| 427 | * | 406 | * |
| 428 | * @flags: for future use. | 407 | * @bssid: BSSID of the BSS to connect to. |
| 429 | * @channel: channel which should be used to connect. | 408 | * @bssid_hint: recommended AP BSSID for initial connection to the BSS or |
| 409 | * 00:00:00:00:00:00 if not specified. | ||
| 410 | * @prev_bssid: previous BSSID, if specified (not 00:00:00:00:00:00) indicates | ||
| 411 | * a request to reassociate. | ||
| 430 | * @bg_scan_period: period of background scan. | 412 | * @bg_scan_period: period of background scan. |
| 413 | * @flags: one of &enum qlink_sta_connect_flags. | ||
| 414 | * @ht_capa: HT Capabilities overrides. | ||
| 415 | * @ht_capa_mask: The bits of ht_capa which are to be used. | ||
| 416 | * @vht_capa: VHT Capability overrides | ||
| 417 | * @vht_capa_mask: The bits of vht_capa which are to be used. | ||
| 431 | * @aen: authentication information. | 418 | * @aen: authentication information. |
| 432 | * @bssid: BSSID of the BSS to connect to. | 419 | * @mfp: whether to use management frame protection. |
| 433 | * @payload: variable portion of connection request. | 420 | * @payload: variable portion of connection request. |
| 434 | */ | 421 | */ |
| 435 | struct qlink_cmd_connect { | 422 | struct qlink_cmd_connect { |
| 436 | struct qlink_cmd chdr; | 423 | struct qlink_cmd chdr; |
| 437 | __le32 flags; | 424 | u8 bssid[ETH_ALEN]; |
| 438 | __le16 channel; | 425 | u8 bssid_hint[ETH_ALEN]; |
| 426 | u8 prev_bssid[ETH_ALEN]; | ||
| 439 | __le16 bg_scan_period; | 427 | __le16 bg_scan_period; |
| 428 | __le32 flags; | ||
| 429 | struct ieee80211_ht_cap ht_capa; | ||
| 430 | struct ieee80211_ht_cap ht_capa_mask; | ||
| 431 | struct ieee80211_vht_cap vht_capa; | ||
| 432 | struct ieee80211_vht_cap vht_capa_mask; | ||
| 440 | struct qlink_auth_encr aen; | 433 | struct qlink_auth_encr aen; |
| 441 | u8 bssid[ETH_ALEN]; | 434 | u8 mfp; |
| 435 | u8 pbss; | ||
| 436 | u8 rsvd[2]; | ||
| 442 | u8 payload[0]; | 437 | u8 payload[0]; |
| 443 | } __packed; | 438 | } __packed; |
| 444 | 439 | ||
| @@ -477,11 +472,11 @@ enum qlink_band { | |||
| 477 | }; | 472 | }; |
| 478 | 473 | ||
| 479 | /** | 474 | /** |
| 480 | * struct qlink_cmd_chans_info_get - data for QLINK_CMD_CHANS_INFO_GET command | 475 | * struct qlink_cmd_band_info_get - data for QLINK_CMD_BAND_INFO_GET command |
| 481 | * | 476 | * |
| 482 | * @band: a PHY band for which channels info is needed, one of @enum qlink_band | 477 | * @band: a PHY band for which information is queried, one of @enum qlink_band |
| 483 | */ | 478 | */ |
| 484 | struct qlink_cmd_chans_info_get { | 479 | struct qlink_cmd_band_info_get { |
| 485 | struct qlink_cmd chdr; | 480 | struct qlink_cmd chdr; |
| 486 | u8 band; | 481 | u8 band; |
| 487 | } __packed; | 482 | } __packed; |
| @@ -562,7 +557,7 @@ enum qlink_hidden_ssid { | |||
| 562 | }; | 557 | }; |
| 563 | 558 | ||
| 564 | /** | 559 | /** |
| 565 | * struct qlink_cmd_config_ap - data for QLINK_CMD_CONFIG_AP command | 560 | * struct qlink_cmd_start_ap - data for QLINK_CMD_START_AP command |
| 566 | * | 561 | * |
| 567 | * @beacon_interval: beacon interval | 562 | * @beacon_interval: beacon interval |
| 568 | * @inactivity_timeout: station's inactivity period in seconds | 563 | * @inactivity_timeout: station's inactivity period in seconds |
| @@ -574,7 +569,7 @@ enum qlink_hidden_ssid { | |||
| 574 | * @aen: encryption info | 569 | * @aen: encryption info |
| 575 | * @info: variable configurations | 570 | * @info: variable configurations |
| 576 | */ | 571 | */ |
| 577 | struct qlink_cmd_config_ap { | 572 | struct qlink_cmd_start_ap { |
| 578 | struct qlink_cmd chdr; | 573 | struct qlink_cmd chdr; |
| 579 | __le16 beacon_interval; | 574 | __le16 beacon_interval; |
| 580 | __le16 inactivity_timeout; | 575 | __le16 inactivity_timeout; |
| @@ -635,10 +630,9 @@ struct qlink_resp { | |||
| 635 | * specified WMAC). | 630 | * specified WMAC). |
| 636 | * @num_tx_chain: Number of transmit chains used by WMAC. | 631 | * @num_tx_chain: Number of transmit chains used by WMAC. |
| 637 | * @num_rx_chain: Number of receive chains used by WMAC. | 632 | * @num_rx_chain: Number of receive chains used by WMAC. |
| 638 | * @vht_cap: VHT capabilities. | 633 | * @vht_cap_mod_mask: mask specifying which VHT capabilities can be altered. |
| 639 | * @ht_cap: HT capabilities. | 634 | * @ht_cap_mod_mask: mask specifying which HT capabilities can be altered. |
| 640 | * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band. | 635 | * @bands_cap: wireless bands WMAC can operate in, bitmap of &enum qlink_band. |
| 641 | * @phymode_cap: PHY modes WMAC can operate in, bitmap of &enum qlink_phy_mode. | ||
| 642 | * @max_ap_assoc_sta: Maximum number of associations supported by WMAC. | 636 | * @max_ap_assoc_sta: Maximum number of associations supported by WMAC. |
| 643 | * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar. | 637 | * @radar_detect_widths: bitmask of channels BW for which WMAC can detect radar. |
| 644 | * @var_info: variable-length WMAC info data. | 638 | * @var_info: variable-length WMAC info data. |
| @@ -648,12 +642,12 @@ struct qlink_resp_get_mac_info { | |||
| 648 | u8 dev_mac[ETH_ALEN]; | 642 | u8 dev_mac[ETH_ALEN]; |
| 649 | u8 num_tx_chain; | 643 | u8 num_tx_chain; |
| 650 | u8 num_rx_chain; | 644 | u8 num_rx_chain; |
| 651 | struct ieee80211_vht_cap vht_cap; | 645 | struct ieee80211_vht_cap vht_cap_mod_mask; |
| 652 | struct ieee80211_ht_cap ht_cap; | 646 | struct ieee80211_ht_cap ht_cap_mod_mask; |
| 653 | u8 bands_cap; | ||
| 654 | u8 phymode_cap; | ||
| 655 | __le16 max_ap_assoc_sta; | 647 | __le16 max_ap_assoc_sta; |
| 656 | __le16 radar_detect_widths; | 648 | __le16 radar_detect_widths; |
| 649 | u8 bands_cap; | ||
| 650 | u8 rsvd[1]; | ||
| 657 | u8 var_info[0]; | 651 | u8 var_info[0]; |
| 658 | } __packed; | 652 | } __packed; |
| 659 | 653 | ||
| @@ -730,17 +724,19 @@ struct qlink_resp_get_sta_info { | |||
| 730 | } __packed; | 724 | } __packed; |
| 731 | 725 | ||
| 732 | /** | 726 | /** |
| 733 | * struct qlink_resp_get_chan_info - response for QLINK_CMD_CHANS_INFO_GET cmd | 727 | * struct qlink_resp_band_info_get - response for QLINK_CMD_BAND_INFO_GET cmd |
| 734 | * | 728 | * |
| 735 | * @band: frequency band to which channels belong to, one of @enum qlink_band. | 729 | * @band: frequency band that the response describes, one of @enum qlink_band. |
| 736 | * @num_chans: total number of channels info data contained in reply data. | 730 | * @num_chans: total number of channels info TLVs contained in reply. |
| 737 | * @info: variable-length channels info. | 731 | * @num_bitrates: total number of bitrate TLVs contained in reply. |
| 732 | * @info: variable-length info portion. | ||
| 738 | */ | 733 | */ |
| 739 | struct qlink_resp_get_chan_info { | 734 | struct qlink_resp_band_info_get { |
| 740 | struct qlink_resp rhdr; | 735 | struct qlink_resp rhdr; |
| 741 | u8 band; | 736 | u8 band; |
| 742 | u8 num_chans; | 737 | u8 num_chans; |
| 743 | u8 rsvd[2]; | 738 | u8 num_bitrates; |
| 739 | u8 rsvd[1]; | ||
| 744 | u8 info[0]; | 740 | u8 info[0]; |
| 745 | } __packed; | 741 | } __packed; |
| 746 | 742 | ||
| @@ -885,12 +881,6 @@ struct qlink_event_rxmgmt { | |||
| 885 | u8 frame_data[0]; | 881 | u8 frame_data[0]; |
| 886 | } __packed; | 882 | } __packed; |
| 887 | 883 | ||
| 888 | enum qlink_frame_type { | ||
| 889 | QLINK_BSS_FTYPE_UNKNOWN, | ||
| 890 | QLINK_BSS_FTYPE_BEACON, | ||
| 891 | QLINK_BSS_FTYPE_PRESP, | ||
| 892 | }; | ||
| 893 | |||
| 894 | /** | 884 | /** |
| 895 | * struct qlink_event_scan_result - data for QLINK_EVENT_SCAN_RESULTS event | 885 | * struct qlink_event_scan_result - data for QLINK_EVENT_SCAN_RESULTS event |
| 896 | * | 886 | * |
| @@ -900,7 +890,6 @@ enum qlink_frame_type { | |||
| 900 | * @capab: capabilities field. | 890 | * @capab: capabilities field. |
| 901 | * @bintval: beacon interval announced by discovered BSS. | 891 | * @bintval: beacon interval announced by discovered BSS. |
| 902 | * @signal: signal strength. | 892 | * @signal: signal strength. |
| 903 | * @frame_type: frame type used to get scan result, see &enum qlink_frame_type. | ||
| 904 | * @bssid: BSSID announced by discovered BSS. | 893 | * @bssid: BSSID announced by discovered BSS. |
| 905 | * @ssid_len: length of SSID announced by BSS. | 894 | * @ssid_len: length of SSID announced by BSS. |
| 906 | * @ssid: SSID announced by discovered BSS. | 895 | * @ssid: SSID announced by discovered BSS. |
| @@ -913,10 +902,10 @@ struct qlink_event_scan_result { | |||
| 913 | __le16 capab; | 902 | __le16 capab; |
| 914 | __le16 bintval; | 903 | __le16 bintval; |
| 915 | s8 signal; | 904 | s8 signal; |
| 916 | u8 frame_type; | ||
| 917 | u8 bssid[ETH_ALEN]; | ||
| 918 | u8 ssid_len; | 905 | u8 ssid_len; |
| 919 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 906 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| 907 | u8 bssid[ETH_ALEN]; | ||
| 908 | u8 rsvd[2]; | ||
| 920 | u8 payload[0]; | 909 | u8 payload[0]; |
| 921 | } __packed; | 910 | } __packed; |
| 922 | 911 | ||
| @@ -1151,6 +1140,33 @@ struct qlink_tlv_chandef { | |||
| 1151 | struct qlink_chandef chan; | 1140 | struct qlink_chandef chan; |
| 1152 | } __packed; | 1141 | } __packed; |
| 1153 | 1142 | ||
| 1143 | enum qlink_ie_set_type { | ||
| 1144 | QLINK_IE_SET_UNKNOWN, | ||
| 1145 | QLINK_IE_SET_ASSOC_REQ, | ||
| 1146 | QLINK_IE_SET_ASSOC_RESP, | ||
| 1147 | QLINK_IE_SET_PROBE_REQ, | ||
| 1148 | QLINK_IE_SET_SCAN, | ||
| 1149 | QLINK_IE_SET_BEACON_HEAD, | ||
| 1150 | QLINK_IE_SET_BEACON_TAIL, | ||
| 1151 | QLINK_IE_SET_BEACON_IES, | ||
| 1152 | QLINK_IE_SET_PROBE_RESP, | ||
| 1153 | QLINK_IE_SET_PROBE_RESP_IES, | ||
| 1154 | }; | ||
| 1155 | |||
| 1156 | /** | ||
| 1157 | * struct qlink_tlv_ie_set - data for QTN_TLV_ID_IE_SET | ||
| 1158 | * | ||
| 1159 | * @type: type of MGMT frame IEs belong to, one of &enum qlink_ie_set_type. | ||
| 1160 | * @flags: for future use. | ||
| 1161 | * @ie_data: IEs data. | ||
| 1162 | */ | ||
| 1163 | struct qlink_tlv_ie_set { | ||
| 1164 | struct qlink_tlv_hdr hdr; | ||
| 1165 | u8 type; | ||
| 1166 | u8 flags; | ||
| 1167 | u8 ie_data[0]; | ||
| 1168 | } __packed; | ||
| 1169 | |||
| 1154 | struct qlink_chan_stats { | 1170 | struct qlink_chan_stats { |
| 1155 | __le32 chan_num; | 1171 | __le32 chan_num; |
| 1156 | __le32 cca_tx; | 1172 | __le32 cca_tx; |
