summary refs log tree commit diff
path: root/net/mac80211/status.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-04-26 17:11:35 +0200
committerJohannes Berg <johannes.berg@intel.com>2017-04-28 10:57:33 +0200
commit18fb84d986b398c59be6729f38f1c4bbbe8c4e9a (patch)
treea8c08b180e5b12d34322204914b3df9c19353217 /net/mac80211/status.c
parentdcba665b1f4a5e986f22ac4230d536341d3ea5da (diff)
downloadlinux-18fb84d986b398c59be6729f38f1c4bbbe8c4e9a.tar.gz
mac80211: make rate control tx status API more extensible
Rename .tx_status_noskb to .tx_status_ext and pass a new on-stack
struct ieee80211_tx_status instead of struct ieee80211_tx_info.

This struct can be used to pass extra information, e.g. for dynamic tx
power control

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r--net/mac80211/status.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index fac191d6dcb7..e655b3abb84a 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -637,6 +637,7 @@ void ieee80211_tx_status_noskb(struct ieee80211_hw *hw,
 {
 	struct ieee80211_local *local = hw_to_local(hw);
 	struct ieee80211_supported_band *sband;
+	struct ieee80211_tx_status status = {};
 	int retry_count;
 	bool acked, noack_success;
 
@@ -669,7 +670,9 @@ void ieee80211_tx_status_noskb(struct ieee80211_hw *hw,
 			ieee80211_lost_packet(sta, info);
 		}
 
-		rate_control_tx_status_noskb(local, sband, sta, info);
+		status.sta = pubsta;
+		status.info = info;
+		rate_control_tx_status(local, sband, &status);
 	}
 
 	if (acked || noack_success) {
@@ -748,6 +751,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct ieee80211_local *local = hw_to_local(hw);
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+	struct ieee80211_tx_status status = {};
 	__le16 fc;
 	struct ieee80211_supported_band *sband;
 	struct rhlist_head *tmp;
@@ -857,7 +861,10 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
 			}
 		}
 
-		rate_control_tx_status(local, sband, sta, skb);
+		status.sta = &sta->sta;
+		status.skb = skb;
+		status.info = info;
+		rate_control_tx_status(local, sband, &status);
 		if (ieee80211_vif_is_mesh(&sta->sdata->vif))
 			ieee80211s_update_metric(local, sta, skb);