diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/sta_cmd.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/sta_cmd.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifiex/sta_cmd.c index f7b920d7a95a..f7d204ffd6e9 100644 --- a/drivers/net/wireless/mwifiex/sta_cmd.c +++ b/drivers/net/wireless/mwifiex/sta_cmd.c | |||
@@ -1897,6 +1897,10 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no, | |||
1897 | case HostCmd_CMD_TDLS_OPER: | 1897 | case HostCmd_CMD_TDLS_OPER: |
1898 | ret = mwifiex_cmd_tdls_oper(priv, cmd_ptr, data_buf); | 1898 | ret = mwifiex_cmd_tdls_oper(priv, cmd_ptr, data_buf); |
1899 | break; | 1899 | break; |
1900 | case HostCmd_CMD_CHAN_REPORT_REQUEST: | ||
1901 | ret = mwifiex_cmd_issue_chan_report_request(priv, cmd_ptr, | ||
1902 | data_buf); | ||
1903 | break; | ||
1900 | default: | 1904 | default: |
1901 | dev_err(priv->adapter->dev, | 1905 | dev_err(priv->adapter->dev, |
1902 | "PREP_CMD: unknown cmd- %#x\n", cmd_no); | 1906 | "PREP_CMD: unknown cmd- %#x\n", cmd_no); |
@@ -1911,6 +1915,8 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no, | |||
1911 | * | 1915 | * |
1912 | * This is called after firmware download to bring the card to | 1916 | * This is called after firmware download to bring the card to |
1913 | * working state. | 1917 | * working state. |
1918 | * Function is also called during reinitialization of virtual | ||
1919 | * interfaces. | ||
1914 | * | 1920 | * |
1915 | * The following commands are issued sequentially - | 1921 | * The following commands are issued sequentially - |
1916 | * - Set PCI-Express host buffer configuration (PCIE only) | 1922 | * - Set PCI-Express host buffer configuration (PCIE only) |
@@ -1925,7 +1931,7 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no, | |||
1925 | * - Set 11d control | 1931 | * - Set 11d control |
1926 | * - Set MAC control (this must be the last command to initialize firmware) | 1932 | * - Set MAC control (this must be the last command to initialize firmware) |
1927 | */ | 1933 | */ |
1928 | int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | 1934 | int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta, bool init) |
1929 | { | 1935 | { |
1930 | struct mwifiex_adapter *adapter = priv->adapter; | 1936 | struct mwifiex_adapter *adapter = priv->adapter; |
1931 | int ret; | 1937 | int ret; |
@@ -2059,9 +2065,6 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
2059 | "11D: failed to enable 11D\n"); | 2065 | "11D: failed to enable 11D\n"); |
2060 | } | 2066 | } |
2061 | 2067 | ||
2062 | /* set last_init_cmd before sending the command */ | ||
2063 | priv->adapter->last_init_cmd = HostCmd_CMD_11N_CFG; | ||
2064 | |||
2065 | /* Send cmd to FW to configure 11n specific configuration | 2068 | /* Send cmd to FW to configure 11n specific configuration |
2066 | * (Short GI, Channel BW, Green field support etc.) for transmit | 2069 | * (Short GI, Channel BW, Green field support etc.) for transmit |
2067 | */ | 2070 | */ |
@@ -2069,7 +2072,11 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8 first_sta) | |||
2069 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_11N_CFG, | 2072 | ret = mwifiex_send_cmd(priv, HostCmd_CMD_11N_CFG, |
2070 | HostCmd_ACT_GEN_SET, 0, &tx_cfg, true); | 2073 | HostCmd_ACT_GEN_SET, 0, &tx_cfg, true); |
2071 | 2074 | ||
2072 | ret = -EINPROGRESS; | 2075 | if (init) { |
2076 | /* set last_init_cmd before sending the command */ | ||
2077 | priv->adapter->last_init_cmd = HostCmd_CMD_11N_CFG; | ||
2078 | ret = -EINPROGRESS; | ||
2079 | } | ||
2073 | 2080 | ||
2074 | return ret; | 2081 | return ret; |
2075 | } | 2082 | } |