Message ID | iwlwifi.20201008180656.b8a493c168a7.Ie9a0f9dfd9e9c58c603dd06e45151119467a7804@changeid (mailing list archive) |
---|---|
State | Accepted |
Commit | bebc14db4eb7120a2c12fb08ee2ea95cdecb8042 |
Delegated to: | Kalle Valo |
Headers | show |
Series | iwlwifi: updates intended for v5.10 2020-10-08 part 1 | expand |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c index c794612c41d5..dd3662b9a5bc 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c @@ -354,18 +354,16 @@ int iwl_mvm_ftm_respoder_add_pasn_sta(struct iwl_mvm *mvm, kfree(sta); return ret; } + + memcpy(sta->addr, addr, ETH_ALEN); + list_add_tail(&sta->list, &mvm->resp_pasn_list); } ret = iwl_mvm_ftm_responder_dyn_cfg_v3(mvm, vif, NULL, &hltk_data); - if (ret) { - if (sta) - iwl_mvm_resp_del_pasn_sta(mvm, vif, sta); - return ret; - } + if (ret && sta) + iwl_mvm_resp_del_pasn_sta(mvm, vif, sta); - memcpy(sta->addr, addr, ETH_ALEN); - list_add_tail(&sta->list, &mvm->resp_pasn_list); - return 0; + return ret; } int iwl_mvm_ftm_resp_remove_pasn_sta(struct iwl_mvm *mvm,