diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-11-10 04:10:14 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-11-24 01:30:31 -0500 |
commit | dc88b4baa9d16fdf15f76b6277461e6d9e4eb8e6 (patch) | |
tree | 8b5f98f7c7bbeb80d5fff39f2d048bf4a991c51b /drivers/net/wireless/iwlwifi/mvm/mvm.h | |
parent | 4741dd049a27fa6490e502d42ff51417c58ac7cd (diff) |
iwlwifi: mvm: add CSA absent time event for clients
Add an absent time event when pre_channel_switch is called and use the
time event started indication to set the disable_tx bit instead of
doing it in unassign_vif(). This is done so that the firmware queues
are stopped before the actual switch takes place to avoid losing
packets while the AP/GO is performing its actual switch.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/mvm.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mvm.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 2c54c522b8c6..2816c6b9222b 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -87,11 +87,12 @@ | |||
87 | /* A TimeUnit is 1024 microsecond */ | 87 | /* A TimeUnit is 1024 microsecond */ |
88 | #define MSEC_TO_TU(_msec) (_msec*1000/1024) | 88 | #define MSEC_TO_TU(_msec) (_msec*1000/1024) |
89 | 89 | ||
90 | /* This value represents the number of TUs before CSA "beacon 0" TBTT | 90 | /* These values represent the number of TUs before CSA "beacon 0" TBTT |
91 | * when the CSA time-event needs to be scheduled to start. It must be | 91 | * when the CSA time-event needs to be scheduled to start. They must |
92 | * big enough to ensure that we switch in time. | 92 | * be big enough to ensure that we switch in time. |
93 | */ | 93 | */ |
94 | #define IWL_MVM_CHANNEL_SWITCH_TIME_GO 40 | 94 | #define IWL_MVM_CHANNEL_SWITCH_TIME_GO 40 |
95 | #define IWL_MVM_CHANNEL_SWITCH_TIME_CLIENT 110 | ||
95 | 96 | ||
96 | /* | 97 | /* |
97 | * This value (in TUs) is used to fine tune the CSA NoA end time which should | 98 | * This value (in TUs) is used to fine tune the CSA NoA end time which should |
@@ -797,6 +798,26 @@ static inline bool iwl_mvm_is_radio_killed(struct iwl_mvm *mvm) | |||
797 | test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status); | 798 | test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status); |
798 | } | 799 | } |
799 | 800 | ||
801 | /* Must be called with rcu_read_lock() held and it can only be | ||
802 | * released when mvmsta is not needed anymore. | ||
803 | */ | ||
804 | static inline struct iwl_mvm_sta * | ||
805 | iwl_mvm_sta_from_staid_rcu(struct iwl_mvm *mvm, u8 sta_id) | ||
806 | { | ||
807 | struct ieee80211_sta *sta; | ||
808 | |||
809 | if (sta_id >= ARRAY_SIZE(mvm->fw_id_to_mac_id)) | ||
810 | return NULL; | ||
811 | |||
812 | sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); | ||
813 | |||
814 | /* This can happen if the station has been removed right now */ | ||
815 | if (IS_ERR_OR_NULL(sta)) | ||
816 | return NULL; | ||
817 | |||
818 | return iwl_mvm_sta_from_mac80211(sta); | ||
819 | } | ||
820 | |||
800 | static inline struct iwl_mvm_sta * | 821 | static inline struct iwl_mvm_sta * |
801 | iwl_mvm_sta_from_staid_protected(struct iwl_mvm *mvm, u8 sta_id) | 822 | iwl_mvm_sta_from_staid_protected(struct iwl_mvm *mvm, u8 sta_id) |
802 | { | 823 | { |