Commit 3eab2034 authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: partially support PHY context version 6

The version 6 command adds the puncture mask to the PHY
context and is otherwise the same. Support that in the
API definitions, but don't fill it yet.

While at it, also mark the field as removed from the link
context command since it moved from there to PHY context.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240218194912.2156fca5b1a5.I57f47f26ec0d96ecfb1192039f72b1c6d4e8a357@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 32a5690e
...@@ -373,7 +373,7 @@ struct iwl_mac_config_cmd { ...@@ -373,7 +373,7 @@ struct iwl_mac_config_cmd {
* iwl_link_ctx_cfg_cmd::bss_color_disable * iwl_link_ctx_cfg_cmd::bss_color_disable
* @LINK_CONTEXT_MODIFY_EHT_PARAMS: covers iwl_link_ctx_cfg_cmd::puncture_mask. * @LINK_CONTEXT_MODIFY_EHT_PARAMS: covers iwl_link_ctx_cfg_cmd::puncture_mask.
* This flag can be set only if the MAC that this link relates to has * This flag can be set only if the MAC that this link relates to has
* eht_support set to true. * eht_support set to true. No longer used since _VER_3 of this command.
* @LINK_CONTEXT_MODIFY_ALL: set all above flags * @LINK_CONTEXT_MODIFY_ALL: set all above flags
*/ */
enum iwl_link_ctx_modify_flags { enum iwl_link_ctx_modify_flags {
...@@ -462,7 +462,7 @@ enum iwl_link_ctx_flags { ...@@ -462,7 +462,7 @@ enum iwl_link_ctx_flags {
* @bi: beacon interval in TU, applicable only when associated * @bi: beacon interval in TU, applicable only when associated
* @dtim_interval: DTIM interval in TU. * @dtim_interval: DTIM interval in TU.
* Relevant only for GO, otherwise this is offloaded. * Relevant only for GO, otherwise this is offloaded.
* @puncture_mask: puncture mask for EHT * @puncture_mask: puncture mask for EHT (removed in VER_3)
* @frame_time_rts_th: HE duration RTS threshold, in units of 32us * @frame_time_rts_th: HE duration RTS threshold, in units of 32us
* @flags: a combination from &enum iwl_link_ctx_flags * @flags: a combination from &enum iwl_link_ctx_flags
* @flags_mask: what of %flags have changed. Also &enum iwl_link_ctx_flags * @flags_mask: what of %flags have changed. Also &enum iwl_link_ctx_flags
...@@ -505,7 +505,7 @@ struct iwl_link_config_cmd { ...@@ -505,7 +505,7 @@ struct iwl_link_config_cmd {
struct iwl_he_backoff_conf trig_based_txf[AC_NUM]; struct iwl_he_backoff_conf trig_based_txf[AC_NUM];
__le32 bi; __le32 bi;
__le32 dtim_interval; __le32 dtim_interval;
__le16 puncture_mask; __le16 puncture_mask; /* removed in _VER_3 */
__le16 frame_time_rts_th; __le16 frame_time_rts_th;
__le32 flags; __le32 flags;
__le32 flags_mask; __le32 flags_mask;
...@@ -519,9 +519,7 @@ struct iwl_link_config_cmd { ...@@ -519,9 +519,7 @@ struct iwl_link_config_cmd {
u8 ibss_bssid_addr[6]; u8 ibss_bssid_addr[6];
__le16 reserved_for_ibss_bssid_addr; __le16 reserved_for_ibss_bssid_addr;
__le32 reserved3[8]; __le32 reserved3[8];
} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1 and } __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3 */
* LINK_CONTEXT_CONFIG_CMD_API_S_VER_2
*/
/* Currently FW supports link ids in the range 0-3 and can have /* Currently FW supports link ids in the range 0-3 and can have
* at most two active links for each vif. * at most two active links for each vif.
......
...@@ -156,17 +156,18 @@ struct iwl_phy_context_cmd { ...@@ -156,17 +156,18 @@ struct iwl_phy_context_cmd {
__le32 lmac_id; __le32 lmac_id;
union { union {
__le32 rxchain_info; /* reserved in _VER_4 */ __le32 rxchain_info; /* reserved in _VER_4 */
struct { /* used for _VER_5 */ struct { /* used for _VER_5/_VER_6 */
u8 sbb_bandwidth; u8 sbb_bandwidth;
u8 sbb_ctrl_channel_loc; u8 sbb_ctrl_channel_loc;
__le16 reserved; __le16 puncture_mask; /* added in VER_6 */
} v5; };
}; };
__le32 dsp_cfg_flags; __le32 dsp_cfg_flags;
__le32 reserved; __le32 reserved;
} __packed; /* PHY_CONTEXT_CMD_API_VER_3, } __packed; /* PHY_CONTEXT_CMD_API_VER_3,
* PHY_CONTEXT_CMD_API_VER_4, * PHY_CONTEXT_CMD_API_VER_4,
* PHY_CONTEXT_CMD_API_VER_5 * PHY_CONTEXT_CMD_API_VER_5,
* PHY_CONTEXT_CMD_API_VER_6
*/ */
#endif /* __iwl_fw_api_phy_ctxt_h__ */ #endif /* __iwl_fw_api_phy_ctxt_h__ */
...@@ -208,7 +208,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, ...@@ -208,7 +208,7 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm,
if (ver < 5 || !ap || !ap->chan) if (ver < 5 || !ap || !ap->chan)
ap = NULL; ap = NULL;
if (ver >= 3 && ver <= 5) { if (ver >= 3 && ver <= 6) {
struct iwl_phy_context_cmd cmd = {}; struct iwl_phy_context_cmd cmd = {};
/* Set the command header fields */ /* Set the command header fields */
...@@ -220,8 +220,8 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm, ...@@ -220,8 +220,8 @@ static int iwl_mvm_phy_ctxt_apply(struct iwl_mvm *mvm,
chains_dynamic); chains_dynamic);
if (ap) { if (ap) {
cmd.v5.sbb_bandwidth = iwl_mvm_get_channel_width(ap); cmd.sbb_bandwidth = iwl_mvm_get_channel_width(ap);
cmd.v5.sbb_ctrl_channel_loc = iwl_mvm_get_ctrl_pos(ap); cmd.sbb_ctrl_channel_loc = iwl_mvm_get_ctrl_pos(ap);
} }
ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD, ret = iwl_mvm_send_cmd_pdu(mvm, PHY_CONTEXT_CMD,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment