|
|
@@ -1852,12 +1852,18 @@ static struct iwl_mvm_sta *iwl_mvm_get_key_sta(struct iwl_mvm *mvm,
|
|
|
mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) {
|
|
|
u8 sta_id = mvmvif->ap_sta_id;
|
|
|
|
|
|
+ sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id],
|
|
|
+ lockdep_is_held(&mvm->mutex));
|
|
|
+
|
|
|
/*
|
|
|
* It is possible that the 'sta' parameter is NULL,
|
|
|
* for example when a GTK is removed - the sta_id will then
|
|
|
* be the AP ID, and no station was passed by mac80211.
|
|
|
*/
|
|
|
- return iwl_mvm_sta_from_staid_protected(mvm, sta_id);
|
|
|
+ if (IS_ERR_OR_NULL(sta))
|
|
|
+ return NULL;
|
|
|
+
|
|
|
+ return iwl_mvm_sta_from_mac80211(sta);
|
|
|
}
|
|
|
|
|
|
return NULL;
|