diff --git a/sys/contrib/dev/iwlwifi/mvm/rxmq.c b/sys/contrib/dev/iwlwifi/mvm/rxmq.c index feb1afd65f8..a29cfbfc99a 100644 --- a/sys/contrib/dev/iwlwifi/mvm/rxmq.c +++ b/sys/contrib/dev/iwlwifi/mvm/rxmq.c @@ -506,6 +506,8 @@ static bool iwl_mvm_is_dup(struct ieee80211_sta *sta, int queue, return false; mvm_sta = iwl_mvm_sta_from_mac80211(sta); + if (WARN_ON(mvm_sta->dup_data == NULL)) + return false; dup_data = &mvm_sta->dup_data[queue]; /* diff --git a/sys/contrib/dev/iwlwifi/mvm/sta.c b/sys/contrib/dev/iwlwifi/mvm/sta.c index f7f2263c3ca..70267a6cd4b 100644 --- a/sys/contrib/dev/iwlwifi/mvm/sta.c +++ b/sys/contrib/dev/iwlwifi/mvm/sta.c @@ -1734,8 +1734,8 @@ int iwl_mvm_drain_sta(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, break; default: ret = -EIO; - IWL_ERR(mvm, "Couldn't drain frames for staid %d\n", - mvmsta->sta_id); + IWL_ERR(mvm, "Couldn't drain frames for staid %d, status %#x\n", + mvmsta->sta_id, status); break; } @@ -1835,8 +1835,10 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm, lockdep_assert_held(&mvm->mutex); - if (iwl_mvm_has_new_rx_api(mvm)) + if (iwl_mvm_has_new_rx_api(mvm)) { kfree(mvm_sta->dup_data); + mvm_sta->dup_data = NULL; + } ret = iwl_mvm_drain_sta(mvm, mvm_sta, true); if (ret)