Skip to content

Commit df65c8d

Browse files
AviSternlucacoelho
authored andcommitted
iwlwifi: mvm: make sure internal station has a valid id
If the driver failed to resume from D3, it is possible that it has no valid aux station. In such case, fw restart will end up in sending station related commands with an invalid station id, which will result in an assert. Fix this by allocating a new station id for the aux station if it does not have a valid id even in the case of fw restart. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
1 parent 4b38790 commit df65c8d

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/sta.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,8 @@ int iwl_mvm_allocate_int_sta(struct iwl_mvm *mvm,
16951695
u32 qmask, enum nl80211_iftype iftype,
16961696
enum iwl_sta_type type)
16971697
{
1698-
if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
1698+
if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) ||
1699+
sta->sta_id == IWL_MVM_INVALID_STA) {
16991700
sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype);
17001701
if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_INVALID_STA))
17011702
return -ENOSPC;

0 commit comments

Comments
 (0)