浏览代码

iwlwifi: mvm: Send power command on BSS_CHANGED_BEACON_INFO if needed

Beacon abort (ba) is set while sending power command, but only
after at least one beacon_filter command was successfully sent.

If we heard a beacon before starting association, this order
is maintained and ba is properly set.

However, if the first beacon is received after association,
we send the power command upon association, configure the
beacon filtering when the first beacon arrives, and in that case,
beacon abort is not set.

So identify this, and send a power command post the beacon_filter
command if needed.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Avri Altman 9 年之前
父节点
当前提交
283115fb1d
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

+ 6 - 1
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

@@ -1955,7 +1955,12 @@ static void iwl_mvm_bss_info_changed_station(struct iwl_mvm *mvm,
 		WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0));
 		WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0));
 	}
 	}
 
 
-	if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | BSS_CHANGED_QOS)) {
+	if (changes & (BSS_CHANGED_PS | BSS_CHANGED_P2P_PS | BSS_CHANGED_QOS |
+		       /*
+			* Send power command on every beacon change,
+			* because we may have not enabled beacon abort yet.
+			*/
+		       BSS_CHANGED_BEACON_INFO)) {
 		ret = iwl_mvm_power_update_mac(mvm);
 		ret = iwl_mvm_power_update_mac(mvm);
 		if (ret)
 		if (ret)
 			IWL_ERR(mvm, "failed to update power mode\n");
 			IWL_ERR(mvm, "failed to update power mode\n");