]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mac80211: common work skb freeing
authorJohannes Berg <johannes.berg@intel.com>
Thu, 10 Jun 2010 08:21:33 +0000 (10:21 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Jun 2010 19:39:26 +0000 (15:39 -0400)
All the management processing functions free the
skb after they are done, so this can be done in
the new common code instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ibss.c
net/mac80211/iface.c
net/mac80211/mesh.c
net/mac80211/mlme.c

index db5a4796ff3c420551d964c4a604384488baa3e0..982690af1f617a02d88f3ecf525561eab0cedea5 100644 (file)
@@ -754,8 +754,6 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
                ieee80211_rx_mgmt_auth_ibss(sdata, mgmt, skb->len);
                break;
        }
-
-       kfree_skb(skb);
 }
 
 void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata)
index 14212ad41e5a99d519a95cb69b43de5415adb07b..1bf276d7024b90f74de403e1341c6172df88f877 100644 (file)
@@ -738,9 +738,10 @@ static void ieee80211_iface_work(struct work_struct *work)
                        break;
                default:
                        WARN(1, "frame for unexpected interface type");
-                       kfree_skb(skb);
                        break;
                }
+
+               kfree_skb(skb);
        }
 
        /* then other type-dependent work */
index 0f1f593c8477c1801582c6224b6993d32927ac9d..83b346cc486095dba3431996709e3a90d0feb46a 100644 (file)
@@ -620,8 +620,6 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
                ieee80211_mesh_rx_mgmt_action(sdata, mgmt, skb->len, rx_status);
                break;
        }
-
-       kfree_skb(skb);
 }
 
 void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
index 2f828ffd5698f3a5e95ccc8d4d5c12fdb206a55f..4a5b29dac9d0d09f8edadbc0f6e3dba1591996d3 100644 (file)
@@ -1754,7 +1754,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
                default:
                        WARN(1, "unexpected: %d", rma);
                }
-               goto out;
+               return;
        }
 
        mutex_unlock(&ifmgd->mtx);
@@ -1762,9 +1762,6 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
        if (skb->len >= 24 + 2 /* mgmt + deauth reason */ &&
            (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH)
                cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
-
- out:
-       kfree_skb(skb);
 }
 
 static void ieee80211_sta_timer(unsigned long data)