diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-08-04 08:14:14 -0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-09-03 15:49:13 -0400 |
commit | 712b24adc105518f7cbbb6f9f353efea48954bb9 (patch) | |
tree | bca6234343200e8e08aebffcc3208118fb1a301f | |
parent | 013290aa46689a97447ef93c7058436315e476d7 (diff) |
iwlwifi: mvm: clean up AUX station handling
The auxiliary station is being handled using the internal
station helper functions, clean that up and make the helpers
static.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/sta.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/sta.h | 5 |
3 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 78ed6bc326a0..8d1d4b40b0a3 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -886,7 +886,7 @@ static void iwl_mvm_mac_stop(struct ieee80211_hw *hw) | |||
886 | /* async_handlers_list is empty and will stay empty: HW is stopped */ | 886 | /* async_handlers_list is empty and will stay empty: HW is stopped */ |
887 | 887 | ||
888 | /* the fw is stopped, the aux sta is dead: clean up driver state */ | 888 | /* the fw is stopped, the aux sta is dead: clean up driver state */ |
889 | iwl_mvm_dealloc_int_sta(mvm, &mvm->aux_sta); | 889 | iwl_mvm_del_aux_sta(mvm); |
890 | 890 | ||
891 | mutex_unlock(&mvm->mutex); | 891 | mutex_unlock(&mvm->mutex); |
892 | 892 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c index ef61979aa286..dd9f3a4347f6 100644 --- a/drivers/net/wireless/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/iwlwifi/mvm/sta.c | |||
@@ -464,8 +464,9 @@ int iwl_mvm_rm_sta_id(struct iwl_mvm *mvm, | |||
464 | return ret; | 464 | return ret; |
465 | } | 465 | } |
466 | 466 | ||
467 | int iwl_mvm_allocate_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta, | 467 | static int iwl_mvm_allocate_int_sta(struct iwl_mvm *mvm, |
468 | u32 qmask, enum nl80211_iftype iftype) | 468 | struct iwl_mvm_int_sta *sta, |
469 | u32 qmask, enum nl80211_iftype iftype) | ||
469 | { | 470 | { |
470 | if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { | 471 | if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { |
471 | sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype); | 472 | sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype); |
@@ -480,7 +481,8 @@ int iwl_mvm_allocate_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta, | |||
480 | return 0; | 481 | return 0; |
481 | } | 482 | } |
482 | 483 | ||
483 | void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta) | 484 | static void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, |
485 | struct iwl_mvm_int_sta *sta) | ||
484 | { | 486 | { |
485 | RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); | 487 | RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); |
486 | memset(sta, 0, sizeof(struct iwl_mvm_int_sta)); | 488 | memset(sta, 0, sizeof(struct iwl_mvm_int_sta)); |
@@ -550,6 +552,13 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) | |||
550 | return ret; | 552 | return ret; |
551 | } | 553 | } |
552 | 554 | ||
555 | void iwl_mvm_del_aux_sta(struct iwl_mvm *mvm) | ||
556 | { | ||
557 | lockdep_assert_held(&mvm->mutex); | ||
558 | |||
559 | iwl_mvm_dealloc_int_sta(mvm, &mvm->aux_sta); | ||
560 | } | ||
561 | |||
553 | /* | 562 | /* |
554 | * Send the add station command for the vif's broadcast station. | 563 | * Send the add station command for the vif's broadcast station. |
555 | * Assumes that the station was already allocated. | 564 | * Assumes that the station was already allocated. |
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.h b/drivers/net/wireless/iwlwifi/mvm/sta.h index 15984fef12b2..aeb3a7f80ceb 100644 --- a/drivers/net/wireless/iwlwifi/mvm/sta.h +++ b/drivers/net/wireless/iwlwifi/mvm/sta.h | |||
@@ -389,10 +389,7 @@ int iwl_mvm_sta_tx_agg_flush(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | |||
389 | struct ieee80211_sta *sta, u16 tid); | 389 | struct ieee80211_sta *sta, u16 tid); |
390 | 390 | ||
391 | int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm); | 391 | int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm); |
392 | int iwl_mvm_allocate_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta, | 392 | void iwl_mvm_del_aux_sta(struct iwl_mvm *mvm); |
393 | u32 qmask, enum nl80211_iftype iftype); | ||
394 | void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, | ||
395 | struct iwl_mvm_int_sta *sta); | ||
396 | 393 | ||
397 | int iwl_mvm_alloc_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif); | 394 | int iwl_mvm_alloc_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif); |
398 | int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif); | 395 | int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif); |