diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-10-21 16:12:18 +0300 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-11-23 21:50:57 +0200 |
commit | 5ac6c72e594471acfa5b00210c51d533a73413ad (patch) | |
tree | a84f476ee1d15917f186e267e67374b024fd8fc4 /drivers/net/wireless/iwlwifi/mvm/mac80211.c | |
parent | iwlwifi: pcie: fix prph dump length (diff) | |
download | linux-dev-5ac6c72e594471acfa5b00210c51d533a73413ad.tar.xz linux-dev-5ac6c72e594471acfa5b00210c51d533a73413ad.zip |
iwlwifi: mvm: check TLV flag before trying to use hotspot firmware commands
Older firmwares do not provide support for the HOT_SPOT_CMD command.
Check for the appropriate TLV flag that declares hotspot support in
the firmware to prevent a firmware assertion failure that can be
triggered from the userspace,
Cc: stable@vger.kernel.org [3.17+]
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index b62405865b25..b6d2683da3a9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -2448,9 +2448,15 @@ static int iwl_mvm_roc(struct ieee80211_hw *hw, switch (vif->type) { case NL80211_IFTYPE_STATION: - /* Use aux roc framework (HS20) */ - ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, - vif, duration); + if (mvm->fw->ucode_capa.capa[0] & + IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT) { + /* Use aux roc framework (HS20) */ + ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, + vif, duration); + goto out_unlock; + } + IWL_ERR(mvm, "hotspot not supported\n"); + ret = -EINVAL; goto out_unlock; case NL80211_IFTYPE_P2P_DEVICE: /* handle below */ |