|
@@ -8,6 +8,7 @@
|
|
|
* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
|
|
|
* Copyright(c) 2013 - 2015 Intel Mobile Communications 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
|
|
|
* 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,
|
|
|
if (ret)
|
|
|
goto out_remove;
|
|
|
|
|
|
- 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)
|
|
|
- goto out_rm_mcast;
|
|
|
+ /*
|
|
|
+ * This is not very nice, but the simplest:
|
|
|
+ * For older FWs adding the mcast sta before the bcast station may
|
|
|
+ * cause assert 0x2b00.
|
|
|
+ * This is fixed in later FW so make the order of removal depend on
|
|
|
+ * the TLV
|
|
|
+ */
|
|
|
+ if (fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_STA_TYPE)) {
|
|
|
+ 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 */
|
|
|
mvmvif->ap_ibss_active = true;
|
|
@@ -2144,7 +2170,6 @@ out_quota_failed:
|
|
|
iwl_mvm_power_update_mac(mvm);
|
|
|
mvmvif->ap_ibss_active = false;
|
|
|
iwl_mvm_send_rm_bcast_sta(mvm, vif);
|
|
|
-out_rm_mcast:
|
|
|
iwl_mvm_rm_mcast_sta(mvm, vif);
|
|
|
out_unbind:
|
|
|
iwl_mvm_binding_remove_vif(mvm, vif);
|