]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: allow driver to handle packet-loss mechanism
authorRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Wed, 14 Sep 2016 07:18:32 +0000 (12:48 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 15 Sep 2016 14:46:20 +0000 (16:46 +0200)
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>
include/net/mac80211.h
net/mac80211/debugfs.c
net/mac80211/status.c

index d9c8ccd6b4e60a57fe432f9f9b1d4a07fa809cd7..5296100f3889920ad92b333a0b6652eac9dc96e2 100644 (file)
@@ -2018,6 +2018,11 @@ struct ieee80211_txq {
  * @IEEE80211_HW_TX_FRAG_LIST: Hardware (or driver) supports sending frag_list
  *     skbs, needed for zero-copy software A-MSDU.
  *
+ * @IEEE80211_HW_REPORTS_LOW_ACK: The driver (or firmware) reports low ack event
+ *     by ieee80211_report_low_ack() based on its own algorithm. For such
+ *     drivers, mac80211 packet loss mechanism will not be triggered and driver
+ *     is completely depending on firmware event for station kickout.
+ *
  * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
  */
 enum ieee80211_hw_flags {
@@ -2058,6 +2063,7 @@ enum ieee80211_hw_flags {
        IEEE80211_HW_USES_RSS,
        IEEE80211_HW_TX_AMSDU,
        IEEE80211_HW_TX_FRAG_LIST,
+       IEEE80211_HW_REPORTS_LOW_ACK,
 
        /* keep last, obviously */
        NUM_IEEE80211_HW_FLAGS
index 5bbb470f335fad684ef3f4831edafd4275dfc441..8ca62b6bb02a570cbfc602b2bfaf612343f53a2e 100644 (file)
@@ -201,6 +201,7 @@ static const char *hw_flag_names[] = {
        FLAG(USES_RSS),
        FLAG(TX_AMSDU),
        FLAG(TX_FRAG_LIST),
+       FLAG(REPORTS_LOW_ACK),
 #undef FLAG
 };
 
index fabd9ff710d930a4c55d4c30afd992f66a0775b7..ea39f8a7baf3816fe843fe8a6c364149a38b3207 100644 (file)
@@ -557,6 +557,12 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local,
 static void ieee80211_lost_packet(struct sta_info *sta,
                                  struct ieee80211_tx_info *info)
 {
+       /* If driver relies on its own algorithm for station kickout, skip
+        * mac80211 packet loss mechanism.
+        */
+       if (ieee80211_hw_check(&sta->local->hw, REPORTS_LOW_ACK))
+               return;
+
        /* This packet was aggregated but doesn't carry status info */
        if ((info->flags & IEEE80211_TX_CTL_AMPDU) &&
            !(info->flags & IEEE80211_TX_STAT_AMPDU))