]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
mac80211: allow low level drivers to report packet loss
authorArik Nemtsov <arik@wizery.com>
Mon, 18 Apr 2011 11:22:28 +0000 (14:22 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 28 Apr 2011 18:50:00 +0000 (14:50 -0400)
Add API that allows low level drivers to notify mac80211 about TX
packet loss. This is useful when there are FW triggers to notify the
low level driver about these events.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
include/net/mac80211.h
net/mac80211/status.c

index 162363b6cb622bcd334872ab19e1d4dca87fd879..8aad6b37c689a8eb61834d49501c5d97a9ffd2ef 100644 (file)
@@ -2291,6 +2291,17 @@ static inline void ieee80211_tx_status_ni(struct ieee80211_hw *hw,
 void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
                                 struct sk_buff *skb);
 
+/**
+ * ieee80211_report_low_ack - report non-responding station
+ *
+ * When operating in AP-mode, call this function to report a non-responding
+ * connected STA.
+ *
+ * @sta: the non-responding connected sta
+ * @num_packets: number of packets sent to @sta without a response
+ */
+void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
+
 /**
  * ieee80211_beacon_get_tim - beacon generation function
  * @hw: pointer obtained from ieee80211_alloc_hw().
index 3ed3c835fbbf0e0f57000825150e62d4b737fc91..1658efaa2e8eef4b042ec05ffd875cbd0d3c6ec1 100644 (file)
@@ -446,3 +446,11 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
        dev_kfree_skb(skb);
 }
 EXPORT_SYMBOL(ieee80211_tx_status);
+
+void ieee80211_report_low_ack(struct ieee80211_sta *pubsta, u32 num_packets)
+{
+       struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
+       cfg80211_cqm_pktloss_notify(sta->sdata->dev, sta->sta.addr,
+                                   num_packets, GFP_ATOMIC);
+}
+EXPORT_SYMBOL(ieee80211_report_low_ack);