]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ath6kl: Fix tx packet drop in AP mode with bridge
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Fri, 4 Nov 2011 10:18:51 +0000 (15:48 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 11 Nov 2011 11:00:01 +0000 (13:00 +0200)
skb is dropped in ath6kl_data_tx() when the headroom in skb
is insufficient. We hit this condition for every skb in AP mode
which is used with bridge, so all tx packets are getting dropped
when tried to send traffic to wireless client from bridge. Fix
this by reallocating the headroom instead of dropping the skb
when it has lesser headroom than needed.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/txrx.c

index 6f1de4468a12b6b2c377a608ab8d188a2329b9aa..d9cff2b950b1e2248a340a3a7f4b496cf025b8e2 100644 (file)
@@ -266,8 +266,14 @@ int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev)
 
        if (test_bit(WMI_ENABLED, &ar->flag)) {
                if (skb_headroom(skb) < dev->needed_headroom) {
-                       WARN_ON(1);
-                       goto fail_tx;
+                       struct sk_buff *tmp_skb = skb;
+
+                       skb = skb_realloc_headroom(skb, dev->needed_headroom);
+                       kfree_skb(tmp_skb);
+                       if (skb == NULL) {
+                               vif->net_stats.tx_dropped++;
+                               return 0;
+                       }
                }
 
                if (ath6kl_wmi_dix_2_dot3(ar->wmi, skb)) {