mirror of https://gitee.com/openkylin/linux.git
iwlwifi: mvm: remove duplicated fields in mvm reorder buffer
The reason station id and tid fields are both in baid data and in the reorder buffer per queue is that we couldn't access the baid_data in the reorder timer functions. Now that we do some pointer math and access it anyway, those fields can be removed. This save some space and some code. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
dfdddd92a5
commit
3f1c4c5806
|
@ -585,11 +585,9 @@ enum iwl_mvm_tdls_cs_state {
|
||||||
* @head_sn: reorder window head sn
|
* @head_sn: reorder window head sn
|
||||||
* @num_stored: number of mpdus stored in the buffer
|
* @num_stored: number of mpdus stored in the buffer
|
||||||
* @buf_size: the reorder buffer size as set by the last addba request
|
* @buf_size: the reorder buffer size as set by the last addba request
|
||||||
* @sta_id: sta id of this reorder buffer
|
|
||||||
* @queue: queue of this reorder buffer
|
* @queue: queue of this reorder buffer
|
||||||
* @last_amsdu: track last ASMDU SN for duplication detection
|
* @last_amsdu: track last ASMDU SN for duplication detection
|
||||||
* @last_sub_index: track ASMDU sub frame index for duplication detection
|
* @last_sub_index: track ASMDU sub frame index for duplication detection
|
||||||
* @tid: the tid
|
|
||||||
* @reorder_timer: timer for frames are in the reorder buffer. For AMSDU
|
* @reorder_timer: timer for frames are in the reorder buffer. For AMSDU
|
||||||
* it is the time of last received sub-frame
|
* it is the time of last received sub-frame
|
||||||
* @removed: prevent timer re-arming
|
* @removed: prevent timer re-arming
|
||||||
|
@ -601,11 +599,9 @@ struct iwl_mvm_reorder_buffer {
|
||||||
u16 head_sn;
|
u16 head_sn;
|
||||||
u16 num_stored;
|
u16 num_stored;
|
||||||
u8 buf_size;
|
u8 buf_size;
|
||||||
u8 sta_id;
|
|
||||||
int queue;
|
int queue;
|
||||||
u16 last_amsdu;
|
u16 last_amsdu;
|
||||||
u8 last_sub_index;
|
u8 last_sub_index;
|
||||||
u8 tid;
|
|
||||||
struct timer_list reorder_timer;
|
struct timer_list reorder_timer;
|
||||||
bool removed;
|
bool removed;
|
||||||
bool valid;
|
bool valid;
|
||||||
|
|
|
@ -505,17 +505,18 @@ void iwl_mvm_reorder_timer_expired(unsigned long data)
|
||||||
if (expired) {
|
if (expired) {
|
||||||
struct ieee80211_sta *sta;
|
struct ieee80211_sta *sta;
|
||||||
struct iwl_mvm_sta *mvmsta;
|
struct iwl_mvm_sta *mvmsta;
|
||||||
|
u8 sta_id = baid_data->sta_id;
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
sta = rcu_dereference(buf->mvm->fw_id_to_mac_id[buf->sta_id]);
|
sta = rcu_dereference(buf->mvm->fw_id_to_mac_id[sta_id]);
|
||||||
mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
mvmsta = iwl_mvm_sta_from_mac80211(sta);
|
||||||
|
|
||||||
/* SN is set to the last expired frame + 1 */
|
/* SN is set to the last expired frame + 1 */
|
||||||
IWL_DEBUG_HT(buf->mvm,
|
IWL_DEBUG_HT(buf->mvm,
|
||||||
"Releasing expired frames for sta %u, sn %d\n",
|
"Releasing expired frames for sta %u, sn %d\n",
|
||||||
buf->sta_id, sn);
|
sta_id, sn);
|
||||||
iwl_mvm_event_frame_timeout_callback(buf->mvm, mvmsta->vif,
|
iwl_mvm_event_frame_timeout_callback(buf->mvm, mvmsta->vif,
|
||||||
sta, buf->tid);
|
sta, baid_data->tid);
|
||||||
iwl_mvm_release_frames(buf->mvm, sta, NULL, buf, sn);
|
iwl_mvm_release_frames(buf->mvm, sta, NULL, buf, sn);
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -2137,7 +2137,6 @@ static void iwl_mvm_free_reorder(struct iwl_mvm *mvm,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iwl_mvm_init_reorder_buffer(struct iwl_mvm *mvm,
|
static void iwl_mvm_init_reorder_buffer(struct iwl_mvm *mvm,
|
||||||
u32 sta_id,
|
|
||||||
struct iwl_mvm_baid_data *data,
|
struct iwl_mvm_baid_data *data,
|
||||||
u16 ssn, u8 buf_size)
|
u16 ssn, u8 buf_size)
|
||||||
{
|
{
|
||||||
|
@ -2161,8 +2160,6 @@ static void iwl_mvm_init_reorder_buffer(struct iwl_mvm *mvm,
|
||||||
spin_lock_init(&reorder_buf->lock);
|
spin_lock_init(&reorder_buf->lock);
|
||||||
reorder_buf->mvm = mvm;
|
reorder_buf->mvm = mvm;
|
||||||
reorder_buf->queue = i;
|
reorder_buf->queue = i;
|
||||||
reorder_buf->sta_id = sta_id;
|
|
||||||
reorder_buf->tid = data->tid;
|
|
||||||
reorder_buf->valid = false;
|
reorder_buf->valid = false;
|
||||||
for (j = 0; j < reorder_buf->buf_size; j++)
|
for (j = 0; j < reorder_buf->buf_size; j++)
|
||||||
__skb_queue_head_init(&entries[j].e.frames);
|
__skb_queue_head_init(&entries[j].e.frames);
|
||||||
|
@ -2294,8 +2291,7 @@ int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
|
||||||
mod_timer(&baid_data->session_timer,
|
mod_timer(&baid_data->session_timer,
|
||||||
TU_TO_EXP_TIME(timeout * 2));
|
TU_TO_EXP_TIME(timeout * 2));
|
||||||
|
|
||||||
iwl_mvm_init_reorder_buffer(mvm, mvm_sta->sta_id,
|
iwl_mvm_init_reorder_buffer(mvm, baid_data, ssn, buf_size);
|
||||||
baid_data, ssn, buf_size);
|
|
||||||
/*
|
/*
|
||||||
* protect the BA data with RCU to cover a case where our
|
* protect the BA data with RCU to cover a case where our
|
||||||
* internal RX sync mechanism will timeout (not that it's
|
* internal RX sync mechanism will timeout (not that it's
|
||||||
|
|
Loading…
Reference in New Issue