]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
wl12xx: don't indicate up PS-filtered dummy packets
authorArik Nemtsov <arik@wizery.com>
Thu, 25 Aug 2011 09:43:12 +0000 (12:43 +0300)
committerLuciano Coelho <coelho@ti.com>
Wed, 14 Sep 2011 09:43:51 +0000 (12:43 +0300)
Dummy packets are currently only sent on the system_hlid link. The
system_hlid link should never be filtered for PS (as it is not
a STA link). Even so, for correctness, don't indicate dummy packets up.
The skb does not belong to mac80211 and as such does not contain a
correct skb->cb.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/ps.c
drivers/net/wireless/wl12xx/tx.c
drivers/net/wireless/wl12xx/tx.h

index 4b720b1b9f65666de26aa9a91f56df1e101116e3..c15ebf2efd40a6e71fc710da1de8206c98c5294d 100644 (file)
@@ -199,15 +199,19 @@ static void wl1271_ps_filter_frames(struct wl1271 *wl, u8 hlid)
        unsigned long flags;
        int filtered[NUM_TX_QUEUES];
 
-       /* filter all frames currently the low level queus for this hlid */
+       /* filter all frames currently in the low level queues for this hlid */
        for (i = 0; i < NUM_TX_QUEUES; i++) {
                filtered[i] = 0;
                while ((skb = skb_dequeue(&wl->links[hlid].tx_queue[i]))) {
+                       filtered[i]++;
+
+                       if (WARN_ON(wl12xx_is_dummy_packet(wl, skb)))
+                               continue;
+
                        info = IEEE80211_SKB_CB(skb);
                        info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
                        info->status.rates[0].idx = -1;
                        ieee80211_tx_status_ni(wl->hw, skb);
-                       filtered[i]++;
                }
        }
 
index b8dbc6d1ff98b1caac4dec4a3e37e1396cca6ab1..b6b2d3ac75cf7b51fdfcf11984cd9eefca7494d8 100644 (file)
@@ -143,7 +143,7 @@ static void wl1271_tx_regulate_link(struct wl1271 *wl, u8 hlid)
                wl1271_ps_link_start(wl, hlid, true);
 }
 
-static bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb)
+bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb)
 {
        return wl->dummy_packet == skb;
 }
index 6519be4b2c38c0be86382db51c9291c2abeb5b3f..5c0fbbe5b42fd558867dd968705b4e3cc0119cf9 100644 (file)
@@ -214,5 +214,6 @@ u32 wl1271_tx_min_rate_get(struct wl1271 *wl);
 u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct sk_buff *skb);
 void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid);
 void wl1271_handle_tx_low_watermark(struct wl1271 *wl);
+bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb);
 
 #endif