Commit ed5cfbe6 authored by Avinash Patil's avatar Avinash Patil Committed by Kalle Valo

mwifiex: support AP reset after bss_stop

This would enable clearing of FW bss data structures when AP
operations are stopped.
Signed-off-by: default avatarAvinash Patil <patila@marvell.com>
Signed-off-by: default avatarCathy Luo <cluo@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent c951a667
...@@ -1725,6 +1725,13 @@ static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev) ...@@ -1725,6 +1725,13 @@ static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
return -1; return -1;
} }
if (mwifiex_send_cmd(priv, HOST_CMD_APCMD_SYS_RESET,
HostCmd_ACT_GEN_SET, 0, NULL, true)) {
mwifiex_dbg(priv->adapter, ERROR,
"Failed to reset BSS\n");
return -1;
}
return 0; return 0;
} }
......
...@@ -574,6 +574,7 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no, ...@@ -574,6 +574,7 @@ int mwifiex_send_cmd(struct mwifiex_private *priv, u16 cmd_no,
case HostCmd_CMD_UAP_BSS_START: case HostCmd_CMD_UAP_BSS_START:
case HostCmd_CMD_UAP_BSS_STOP: case HostCmd_CMD_UAP_BSS_STOP:
case HostCmd_CMD_UAP_STA_DEAUTH: case HostCmd_CMD_UAP_STA_DEAUTH:
case HOST_CMD_APCMD_SYS_RESET:
ret = mwifiex_uap_prepare_cmd(priv, cmd_no, cmd_action, ret = mwifiex_uap_prepare_cmd(priv, cmd_no, cmd_action,
cmd_oid, data_buf, cmd_oid, data_buf,
cmd_ptr); cmd_ptr);
......
...@@ -330,6 +330,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER { ...@@ -330,6 +330,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
#define HostCmd_CMD_RSSI_INFO 0x00a4 #define HostCmd_CMD_RSSI_INFO 0x00a4
#define HostCmd_CMD_FUNC_INIT 0x00a9 #define HostCmd_CMD_FUNC_INIT 0x00a9
#define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa #define HostCmd_CMD_FUNC_SHUTDOWN 0x00aa
#define HOST_CMD_APCMD_SYS_RESET 0x00af
#define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0 #define HostCmd_CMD_UAP_SYS_CONFIG 0x00b0
#define HostCmd_CMD_UAP_BSS_START 0x00b1 #define HostCmd_CMD_UAP_BSS_START 0x00b1
#define HostCmd_CMD_UAP_BSS_STOP 0x00b2 #define HostCmd_CMD_UAP_BSS_STOP 0x00b2
......
...@@ -1159,6 +1159,8 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no, ...@@ -1159,6 +1159,8 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
break; break;
case HostCmd_CMD_UAP_STA_DEAUTH: case HostCmd_CMD_UAP_STA_DEAUTH:
break; break;
case HOST_CMD_APCMD_SYS_RESET:
break;
case HostCmd_CMD_MEF_CFG: case HostCmd_CMD_MEF_CFG:
break; break;
case HostCmd_CMD_COALESCE_CFG: case HostCmd_CMD_COALESCE_CFG:
......
...@@ -754,6 +754,7 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no, ...@@ -754,6 +754,7 @@ int mwifiex_uap_prepare_cmd(struct mwifiex_private *priv, u16 cmd_no,
break; break;
case HostCmd_CMD_UAP_BSS_START: case HostCmd_CMD_UAP_BSS_START:
case HostCmd_CMD_UAP_BSS_STOP: case HostCmd_CMD_UAP_BSS_STOP:
case HOST_CMD_APCMD_SYS_RESET:
cmd->command = cpu_to_le16(cmd_no); cmd->command = cpu_to_le16(cmd_no);
cmd->size = cpu_to_le16(S_DS_GEN); cmd->size = cpu_to_le16(S_DS_GEN);
break; break;
...@@ -811,8 +812,13 @@ int mwifiex_config_start_uap(struct mwifiex_private *priv, ...@@ -811,8 +812,13 @@ int mwifiex_config_start_uap(struct mwifiex_private *priv,
if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_STOP, if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_BSS_STOP,
HostCmd_ACT_GEN_SET, 0, NULL, true)) { HostCmd_ACT_GEN_SET, 0, NULL, true)) {
mwifiex_dbg(priv->adapter, ERROR, mwifiex_dbg(priv->adapter, ERROR, "Failed to stop the BSS\n");
"Failed to stop the BSS\n"); return -1;
}
if (mwifiex_send_cmd(priv, HOST_CMD_APCMD_SYS_RESET,
HostCmd_ACT_GEN_SET, 0, NULL, true)) {
mwifiex_dbg(priv->adapter, ERROR, "Failed to reset BSS\n");
return -1; return -1;
} }
......
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