Commit 63dd5d02 authored by Sara Sharon's avatar Sara Sharon Committed by Luca Coelho

iwlwifi: mvm: fix assert 0x2B00 on older FWs

We should add the multicast station before adding the
broadcast station.

However, in older FW, the firmware will start beaconing
when we add the multicast station, and since the broadcast
station is not added at this point so the transmission
of the beacon will fail on assert 0x2b00.

This is fixed in later firmware, so make the order
of addition depend on the TLV.

Fixes: 26d6c16b ("iwlwifi: mvm: add multicast station")
Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 40d53f4a
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
* Copyright(c) 2018 Intel Corporation
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as * it under the terms of version 2 of the GNU General Public License as
...@@ -2106,15 +2107,40 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, ...@@ -2106,15 +2107,40 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
if (ret) if (ret)
goto out_remove; goto out_remove;
ret = iwl_mvm_add_mcast_sta(mvm, vif); /*
if (ret) * This is not very nice, but the simplest:
goto out_unbind; * For older FWs adding the mcast sta before the bcast station may
* cause assert 0x2b00.
/* Send the bcast station. At this stage the TBTT and DTIM time events * This is fixed in later FW so make the order of removal depend on
* are added and applied to the scheduler */ * the TLV
ret = iwl_mvm_send_add_bcast_sta(mvm, vif); */
if (ret) if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_STA_TYPE)) {
goto out_rm_mcast; ret = iwl_mvm_add_mcast_sta(mvm, vif);
if (ret)
goto out_unbind;
/*
* Send the bcast station. At this stage the TBTT and DTIM time
* events are added and applied to the scheduler
*/
ret = iwl_mvm_send_add_bcast_sta(mvm, vif);
if (ret) {
iwl_mvm_rm_mcast_sta(mvm, vif);
goto out_unbind;
}
} else {
/*
* Send the bcast station. At this stage the TBTT and DTIM time
* events are added and applied to the scheduler
*/
iwl_mvm_send_add_bcast_sta(mvm, vif);
if (ret)
goto out_unbind;
iwl_mvm_add_mcast_sta(mvm, vif);
if (ret) {
iwl_mvm_send_rm_bcast_sta(mvm, vif);
goto out_unbind;
}
}
/* must be set before quota calculations */ /* must be set before quota calculations */
mvmvif->ap_ibss_active = true; mvmvif->ap_ibss_active = true;
...@@ -2144,7 +2170,6 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw, ...@@ -2144,7 +2170,6 @@ static int iwl_mvm_start_ap_ibss(struct ieee80211_hw *hw,
iwl_mvm_power_update_mac(mvm); iwl_mvm_power_update_mac(mvm);
mvmvif->ap_ibss_active = false; mvmvif->ap_ibss_active = false;
iwl_mvm_send_rm_bcast_sta(mvm, vif); iwl_mvm_send_rm_bcast_sta(mvm, vif);
out_rm_mcast:
iwl_mvm_rm_mcast_sta(mvm, vif); iwl_mvm_rm_mcast_sta(mvm, vif);
out_unbind: out_unbind:
iwl_mvm_binding_remove_vif(mvm, vif); iwl_mvm_binding_remove_vif(mvm, vif);
......
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