Skip to content

Commit e8a24cd

Browse files
Rajkumar Manoharanjmberg-intel
authored andcommitted
mac80211: allow driver to handle packet-loss mechanism
Based on consecutive msdu failures, mac80211 triggers CQM packet-loss mechanism. Drivers like ath10k that have its own connection monitoring algorithm, offloaded to firmware for triggering station kickout. In case of station kickout, driver will report low ack status by mac80211 API (ieee80211_report_low_ack). This flag will enable the driver to completely rely on firmware events for station kickout and bypass mac80211 packet loss mechanism. Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent c7e9dbc commit e8a24cd

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

include/net/mac80211.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2018,6 +2018,11 @@ struct ieee80211_txq {
20182018
* @IEEE80211_HW_TX_FRAG_LIST: Hardware (or driver) supports sending frag_list
20192019
* skbs, needed for zero-copy software A-MSDU.
20202020
*
2021+
* @IEEE80211_HW_REPORTS_LOW_ACK: The driver (or firmware) reports low ack event
2022+
* by ieee80211_report_low_ack() based on its own algorithm. For such
2023+
* drivers, mac80211 packet loss mechanism will not be triggered and driver
2024+
* is completely depending on firmware event for station kickout.
2025+
*
20212026
* @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
20222027
*/
20232028
enum ieee80211_hw_flags {
@@ -2058,6 +2063,7 @@ enum ieee80211_hw_flags {
20582063
IEEE80211_HW_USES_RSS,
20592064
IEEE80211_HW_TX_AMSDU,
20602065
IEEE80211_HW_TX_FRAG_LIST,
2066+
IEEE80211_HW_REPORTS_LOW_ACK,
20612067

20622068
/* keep last, obviously */
20632069
NUM_IEEE80211_HW_FLAGS

net/mac80211/debugfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ static const char *hw_flag_names[] = {
201201
FLAG(USES_RSS),
202202
FLAG(TX_AMSDU),
203203
FLAG(TX_FRAG_LIST),
204+
FLAG(REPORTS_LOW_ACK),
204205
#undef FLAG
205206
};
206207

net/mac80211/status.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,12 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local,
557557
static void ieee80211_lost_packet(struct sta_info *sta,
558558
struct ieee80211_tx_info *info)
559559
{
560+
/* If driver relies on its own algorithm for station kickout, skip
561+
* mac80211 packet loss mechanism.
562+
*/
563+
if (ieee80211_hw_check(&sta->local->hw, REPORTS_LOW_ACK))
564+
return;
565+
560566
/* This packet was aggregated but doesn't carry status info */
561567
if ((info->flags & IEEE80211_TX_CTL_AMPDU) &&
562568
!(info->flags & IEEE80211_TX_STAT_AMPDU))

0 commit comments

Comments
 (0)