aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-11-30 02:58:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-22 14:33:37 -0500
commite1e5406854378dfada3f33c7192b012083a5b8e0 (patch)
treee878058f28b8f6db50ef5d73d09aed66dd9ad9f2 /net/mac80211/tx.c
parentfe67c913f1ec2a01aaa9176c80ef36eaf87d705d (diff)
mac80211: add throughput based LED blink trigger
iwlwifi and other drivers like to blink their LED based on throughput. Implement this generically in mac80211, based on a throughput table the driver specifies. That way, drivers can set the blink frequencies depending on their desired behaviour and max throughput. All the drivers need to do is provide an LED class device, best with blink hardware offload. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d2b4b67a7b53..68c2fbd16ebb 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1297,6 +1297,7 @@ static int __ieee80211_tx(struct ieee80211_local *local,
1297 1297
1298 while (skb) { 1298 while (skb) {
1299 int q = skb_get_queue_mapping(skb); 1299 int q = skb_get_queue_mapping(skb);
1300 __le16 fc;
1300 1301
1301 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); 1302 spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
1302 ret = IEEE80211_TX_OK; 1303 ret = IEEE80211_TX_OK;
@@ -1339,6 +1340,7 @@ static int __ieee80211_tx(struct ieee80211_local *local,
1339 else 1340 else
1340 info->control.sta = NULL; 1341 info->control.sta = NULL;
1341 1342
1343 fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
1342 ret = drv_tx(local, skb); 1344 ret = drv_tx(local, skb);
1343 if (WARN_ON(ret != NETDEV_TX_OK && skb->len != len)) { 1345 if (WARN_ON(ret != NETDEV_TX_OK && skb->len != len)) {
1344 dev_kfree_skb(skb); 1346 dev_kfree_skb(skb);
@@ -1349,6 +1351,7 @@ static int __ieee80211_tx(struct ieee80211_local *local,
1349 return IEEE80211_TX_AGAIN; 1351 return IEEE80211_TX_AGAIN;
1350 } 1352 }
1351 1353
1354 ieee80211_tpt_led_trig_tx(local, fc, len);
1352 *skbp = skb = next; 1355 *skbp = skb = next;
1353 ieee80211_led_tx(local, 1); 1356 ieee80211_led_tx(local, 1);
1354 fragm = true; 1357 fragm = true;