iwlwifi: mvm: support firmware debug trigger on frame reorder timeout
The trigger that collects data when a frame is released because of the timer of the reordering buffer was not implemented for 9000 devices. Fix this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
d7b9bb69c9
commit
528a542aa6
@ -4186,31 +4186,6 @@ static void iwl_mvm_event_bar_rx_callback(struct iwl_mvm *mvm,
|
|||||||
event->u.ba.ssn);
|
event->u.ba.ssn);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
iwl_mvm_event_frame_timeout_callback(struct iwl_mvm *mvm,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
const struct ieee80211_event *event)
|
|
||||||
{
|
|
||||||
struct iwl_fw_dbg_trigger_tlv *trig;
|
|
||||||
struct iwl_fw_dbg_trigger_ba *ba_trig;
|
|
||||||
|
|
||||||
if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_BA))
|
|
||||||
return;
|
|
||||||
|
|
||||||
trig = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_BA);
|
|
||||||
ba_trig = (void *)trig->data;
|
|
||||||
if (!iwl_fw_dbg_trigger_check_stop(&mvm->fwrt,
|
|
||||||
ieee80211_vif_to_wdev(vif), trig))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!(le16_to_cpu(ba_trig->frame_timeout) & BIT(event->u.ba.tid)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
iwl_fw_dbg_collect_trig(&mvm->fwrt, trig,
|
|
||||||
"Frame from %pM timed out, tid %d",
|
|
||||||
event->u.ba.sta->addr, event->u.ba.tid);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void iwl_mvm_mac_event_callback(struct ieee80211_hw *hw,
|
static void iwl_mvm_mac_event_callback(struct ieee80211_hw *hw,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
const struct ieee80211_event *event)
|
const struct ieee80211_event *event)
|
||||||
@ -4225,7 +4200,8 @@ static void iwl_mvm_mac_event_callback(struct ieee80211_hw *hw,
|
|||||||
iwl_mvm_event_bar_rx_callback(mvm, vif, event);
|
iwl_mvm_event_bar_rx_callback(mvm, vif, event);
|
||||||
break;
|
break;
|
||||||
case BA_FRAME_TIMEOUT:
|
case BA_FRAME_TIMEOUT:
|
||||||
iwl_mvm_event_frame_timeout_callback(mvm, vif, event);
|
iwl_mvm_event_frame_timeout_callback(mvm, vif, event->u.ba.sta,
|
||||||
|
event->u.ba.tid);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -586,6 +586,7 @@ enum iwl_mvm_tdls_cs_state {
|
|||||||
* @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
|
||||||
* @entries: list of skbs stored
|
* @entries: list of skbs stored
|
||||||
* @reorder_time: time the packet was stored in the reorder buffer
|
* @reorder_time: time the packet was stored in the reorder buffer
|
||||||
* @reorder_timer: timer for frames are in the reorder buffer. For AMSDU
|
* @reorder_timer: timer for frames are in the reorder buffer. For AMSDU
|
||||||
@ -603,6 +604,7 @@ struct iwl_mvm_reorder_buffer {
|
|||||||
int queue;
|
int queue;
|
||||||
u16 last_amsdu;
|
u16 last_amsdu;
|
||||||
u8 last_sub_index;
|
u8 last_sub_index;
|
||||||
|
u8 tid;
|
||||||
struct sk_buff_head entries[IEEE80211_MAX_AMPDU_BUF];
|
struct sk_buff_head entries[IEEE80211_MAX_AMPDU_BUF];
|
||||||
unsigned long reorder_time[IEEE80211_MAX_AMPDU_BUF];
|
unsigned long reorder_time[IEEE80211_MAX_AMPDU_BUF];
|
||||||
struct timer_list reorder_timer;
|
struct timer_list reorder_timer;
|
||||||
@ -1839,6 +1841,10 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm,
|
|||||||
bool tdls, bool cmd_q);
|
bool tdls, bool cmd_q);
|
||||||
void iwl_mvm_connection_loss(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
void iwl_mvm_connection_loss(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||||
const char *errmsg);
|
const char *errmsg);
|
||||||
|
void iwl_mvm_event_frame_timeout_callback(struct iwl_mvm *mvm,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
const struct ieee80211_sta *sta,
|
||||||
|
u16 tid);
|
||||||
|
|
||||||
int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b);
|
int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b);
|
||||||
int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm);
|
int iwl_mvm_get_sar_geo_profile(struct iwl_mvm *mvm);
|
||||||
|
@ -492,13 +492,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;
|
||||||
|
|
||||||
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[buf->sta_id]);
|
||||||
|
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);
|
buf->sta_id, sn);
|
||||||
|
iwl_mvm_event_frame_timeout_callback(buf->mvm, mvmsta->vif,
|
||||||
|
sta, buf->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 {
|
||||||
|
@ -2158,6 +2158,7 @@ static void iwl_mvm_init_reorder_buffer(struct iwl_mvm *mvm,
|
|||||||
reorder_buf->mvm = mvm;
|
reorder_buf->mvm = mvm;
|
||||||
reorder_buf->queue = i;
|
reorder_buf->queue = i;
|
||||||
reorder_buf->sta_id = sta_id;
|
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(&reorder_buf->entries[j]);
|
__skb_queue_head_init(&reorder_buf->entries[j]);
|
||||||
|
@ -1368,6 +1368,31 @@ void iwl_mvm_inactivity_check(struct iwl_mvm *mvm)
|
|||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void iwl_mvm_event_frame_timeout_callback(struct iwl_mvm *mvm,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
const struct ieee80211_sta *sta,
|
||||||
|
u16 tid)
|
||||||
|
{
|
||||||
|
struct iwl_fw_dbg_trigger_tlv *trig;
|
||||||
|
struct iwl_fw_dbg_trigger_ba *ba_trig;
|
||||||
|
|
||||||
|
if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_BA))
|
||||||
|
return;
|
||||||
|
|
||||||
|
trig = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_BA);
|
||||||
|
ba_trig = (void *)trig->data;
|
||||||
|
if (!iwl_fw_dbg_trigger_check_stop(&mvm->fwrt,
|
||||||
|
ieee80211_vif_to_wdev(vif), trig))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!(le16_to_cpu(ba_trig->frame_timeout) & BIT(tid)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
iwl_fw_dbg_collect_trig(&mvm->fwrt, trig,
|
||||||
|
"Frame from %pM timed out, tid %d",
|
||||||
|
sta->addr, tid);
|
||||||
|
}
|
||||||
|
|
||||||
void iwl_mvm_get_sync_time(struct iwl_mvm *mvm, u32 *gp2, u64 *boottime)
|
void iwl_mvm_get_sync_time(struct iwl_mvm *mvm, u32 *gp2, u64 *boottime)
|
||||||
{
|
{
|
||||||
bool ps_disabled;
|
bool ps_disabled;
|
||||||
|
Loading…
Reference in New Issue
Block a user