diff options
author | Yogesh Ashok Powar <yogeshp@marvell.com> | 2013-01-25 05:50:03 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-30 15:06:50 -0500 |
commit | d59c1cfd7c106f53272143bc3f05b0b15bdd5dfa (patch) | |
tree | 2f8abc79e92b88de35b36aaaed454fc68b4cf4e7 /drivers/net/wireless/mwl8k.c | |
parent | 2acdaa7a578cf43566950a6cfb70848ff6607553 (diff) |
mwl8k: Allow adding station interface on AP firmware
When user wants to add a station interface when
AP firmware is loaded & in-use, allow creating
it and also notify user about the same.
Allow adding max one STA interface for AP fw.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 0a22bb173739..84207a8e5e0a 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -2519,7 +2519,7 @@ static int mwl8k_cmd_get_hw_spec_ap(struct ieee80211_hw *hw) | |||
2519 | priv->hw_rev = cmd->hw_rev; | 2519 | priv->hw_rev = cmd->hw_rev; |
2520 | mwl8k_set_caps(hw, le32_to_cpu(cmd->caps)); | 2520 | mwl8k_set_caps(hw, le32_to_cpu(cmd->caps)); |
2521 | priv->ap_macids_supported = 0x000000ff; | 2521 | priv->ap_macids_supported = 0x000000ff; |
2522 | priv->sta_macids_supported = 0x00000000; | 2522 | priv->sta_macids_supported = 0x00000100; |
2523 | priv->num_ampdu_queues = le32_to_cpu(cmd->num_of_ampdu_queues); | 2523 | priv->num_ampdu_queues = le32_to_cpu(cmd->num_of_ampdu_queues); |
2524 | if (priv->num_ampdu_queues > MWL8K_MAX_AMPDU_QUEUES) { | 2524 | if (priv->num_ampdu_queues > MWL8K_MAX_AMPDU_QUEUES) { |
2525 | wiphy_warn(hw->wiphy, "fw reported %d ampdu queues" | 2525 | wiphy_warn(hw->wiphy, "fw reported %d ampdu queues" |
@@ -4669,12 +4669,18 @@ static int mwl8k_add_interface(struct ieee80211_hw *hw, | |||
4669 | break; | 4669 | break; |
4670 | case NL80211_IFTYPE_STATION: | 4670 | case NL80211_IFTYPE_STATION: |
4671 | if (priv->ap_fw && di->fw_image_sta) { | 4671 | if (priv->ap_fw && di->fw_image_sta) { |
4672 | /* we must load the sta fw to meet this request */ | 4672 | if (!list_empty(&priv->vif_list)) { |
4673 | if (!list_empty(&priv->vif_list)) | 4673 | wiphy_warn(hw->wiphy, "AP interface is running.\n" |
4674 | return -EBUSY; | 4674 | "Adding STA interface for WDS"); |
4675 | rc = mwl8k_reload_firmware(hw, di->fw_image_sta); | 4675 | } else { |
4676 | if (rc) | 4676 | /* we must load the sta fw to |
4677 | return rc; | 4677 | * meet this request. |
4678 | */ | ||
4679 | rc = mwl8k_reload_firmware(hw, | ||
4680 | di->fw_image_sta); | ||
4681 | if (rc) | ||
4682 | return rc; | ||
4683 | } | ||
4678 | } | 4684 | } |
4679 | macids_supported = priv->sta_macids_supported; | 4685 | macids_supported = priv->sta_macids_supported; |
4680 | break; | 4686 | break; |