]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/mwifiex/11ac.c
mwifiex: add support to configure VHT for AP mode
[~andy/linux] / drivers / net / wireless / mwifiex / 11ac.c
index cf43b3c29250add91bffeb663835c7e436fe7b4d..de0a63469cb16da8cfd0a45b00387bc70d4704c8 100644 (file)
@@ -259,3 +259,22 @@ int mwifiex_cmd_append_11ac_tlv(struct mwifiex_private *priv,
 
        return ret_len;
 }
+
+int mwifiex_cmd_11ac_cfg(struct mwifiex_private *priv,
+                        struct host_cmd_ds_command *cmd, u16 cmd_action,
+                        struct mwifiex_11ac_vht_cfg *cfg)
+{
+       struct host_cmd_11ac_vht_cfg *vhtcfg = &cmd->params.vht_cfg;
+
+       cmd->command = cpu_to_le16(HostCmd_CMD_11AC_CFG);
+       cmd->size = cpu_to_le16(sizeof(struct host_cmd_11ac_vht_cfg) +
+                               S_DS_GEN);
+       vhtcfg->action = cpu_to_le16(cmd_action);
+       vhtcfg->band_config = cfg->band_config;
+       vhtcfg->misc_config = cfg->misc_config;
+       vhtcfg->cap_info = cpu_to_le32(cfg->cap_info);
+       vhtcfg->mcs_tx_set = cpu_to_le32(cfg->mcs_tx_set);
+       vhtcfg->mcs_rx_set = cpu_to_le32(cfg->mcs_rx_set);
+
+       return 0;
+}