diff options
author | Javier Cardona <javier@cozybit.com> | 2011-09-06 13:05:21 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-14 13:56:17 -0400 |
commit | cfee66b0f9891fc2b79a238e737308a2732365d2 (patch) | |
tree | 61eaebffc363a5eb28cf0712a74a8628704f1254 /net/mac80211/rx.c | |
parent | 2157fdd6ae3f760a95c5c50072a1b4ac656eb9f5 (diff) |
mac80211: Stop forwarding mesh traffic when tx queues are full
Tx flow control for non-mesh modes of operation only needs to act on the
net device queues: when the hardware queues are full we stop accepting
traffic from the net device. In mesh, however, we also need to stop
forwarding traffic. This patch checks the hardware queues before
attempting to forward a mesh frame.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index d479d48e8d1..811e3ade8c7 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1844,6 +1844,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx) /* illegal frame */ return RX_DROP_MONITOR; + if (ieee80211_queue_stopped(&local->hw, skb_get_queue_mapping(skb))) { + IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh, + dropped_frames_congestion); + return RX_DROP_MONITOR; + } + if (mesh_hdr->flags & MESH_FLAGS_AE) { struct mesh_path *mppath; char *proxied_addr; |