diff options
author | Vivek Natarajan <vivek.natraj@gmail.com> | 2008-12-23 21:17:19 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:58:48 -0500 |
commit | d063ed0f0cd623b45edc6f4781dda6478c56bb4f (patch) | |
tree | 04c4eb5918d307b487f0590b4f1b57e8693bbc2a /net/mac80211/tx.c | |
parent | eb46936b9f2b639f4edeeaf9154d49476fc30fe5 (diff) |
mac80211: Reset the power save timer from master_start_xmit.
When a null data frame is generated from mac80211, it goes through
master_start_xmit and not through subif_start_xmit. Hence for the
power save timer to be triggered while sending this null data frame
also, the timer has to be reset from master_start_xmit.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 4278e545638f..0bf2272200ad 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1296,6 +1296,19 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1296 | return 0; | 1296 | return 0; |
1297 | } | 1297 | } |
1298 | 1298 | ||
1299 | if (!(local->hw.flags & IEEE80211_HW_NO_STACK_DYNAMIC_PS) && | ||
1300 | local->dynamic_ps_timeout > 0) { | ||
1301 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { | ||
1302 | ieee80211_stop_queues_by_reason(&local->hw, | ||
1303 | IEEE80211_QUEUE_STOP_REASON_PS); | ||
1304 | queue_work(local->hw.workqueue, | ||
1305 | &local->dynamic_ps_disable_work); | ||
1306 | } | ||
1307 | |||
1308 | mod_timer(&local->dynamic_ps_timer, jiffies + | ||
1309 | msecs_to_jiffies(local->dynamic_ps_timeout)); | ||
1310 | } | ||
1311 | |||
1299 | memset(info, 0, sizeof(*info)); | 1312 | memset(info, 0, sizeof(*info)); |
1300 | 1313 | ||
1301 | info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; | 1314 | info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; |
@@ -1475,19 +1488,6 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1475 | goto fail; | 1488 | goto fail; |
1476 | } | 1489 | } |
1477 | 1490 | ||
1478 | if (!(local->hw.flags & IEEE80211_HW_NO_STACK_DYNAMIC_PS) && | ||
1479 | local->dynamic_ps_timeout > 0) { | ||
1480 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { | ||
1481 | ieee80211_stop_queues_by_reason(&local->hw, | ||
1482 | IEEE80211_QUEUE_STOP_REASON_PS); | ||
1483 | queue_work(local->hw.workqueue, | ||
1484 | &local->dynamic_ps_disable_work); | ||
1485 | } | ||
1486 | |||
1487 | mod_timer(&local->dynamic_ps_timer, jiffies + | ||
1488 | msecs_to_jiffies(local->dynamic_ps_timeout)); | ||
1489 | } | ||
1490 | |||
1491 | nh_pos = skb_network_header(skb) - skb->data; | 1491 | nh_pos = skb_network_header(skb) - skb->data; |
1492 | h_pos = skb_transport_header(skb) - skb->data; | 1492 | h_pos = skb_transport_header(skb) - skb->data; |
1493 | 1493 | ||