diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-06-10 04:21:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:26 -0400 |
commit | 36b3a628a4e85d002ee8813ebd2a5caef6d3c1a7 (patch) | |
tree | 927219d1cf6ef466ec574c8172365fa1b37d53be /net | |
parent | 1fa57d017366fb26b58af110a38b36a4f0214a62 (diff) |
mac80211: common work skb freeing
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ibss.c | 2 | ||||
-rw-r--r-- | net/mac80211/iface.c | 3 | ||||
-rw-r--r-- | net/mac80211/mesh.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 5 |
4 files changed, 3 insertions, 9 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index db5a4796ff3c..982690af1f61 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -754,8 +754,6 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
754 | ieee80211_rx_mgmt_auth_ibss(sdata, mgmt, skb->len); | 754 | ieee80211_rx_mgmt_auth_ibss(sdata, mgmt, skb->len); |
755 | break; | 755 | break; |
756 | } | 756 | } |
757 | |||
758 | kfree_skb(skb); | ||
759 | } | 757 | } |
760 | 758 | ||
761 | void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata) | 759 | void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata) |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 14212ad41e5a..1bf276d7024b 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -738,9 +738,10 @@ static void ieee80211_iface_work(struct work_struct *work) | |||
738 | break; | 738 | break; |
739 | default: | 739 | default: |
740 | WARN(1, "frame for unexpected interface type"); | 740 | WARN(1, "frame for unexpected interface type"); |
741 | kfree_skb(skb); | ||
742 | break; | 741 | break; |
743 | } | 742 | } |
743 | |||
744 | kfree_skb(skb); | ||
744 | } | 745 | } |
745 | 746 | ||
746 | /* then other type-dependent work */ | 747 | /* then other type-dependent work */ |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 0f1f593c8477..83b346cc4860 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -620,8 +620,6 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
620 | ieee80211_mesh_rx_mgmt_action(sdata, mgmt, skb->len, rx_status); | 620 | ieee80211_mesh_rx_mgmt_action(sdata, mgmt, skb->len, rx_status); |
621 | break; | 621 | break; |
622 | } | 622 | } |
623 | |||
624 | kfree_skb(skb); | ||
625 | } | 623 | } |
626 | 624 | ||
627 | void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata) | 625 | void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata) |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 2f828ffd5698..4a5b29dac9d0 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1754,7 +1754,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1754 | default: | 1754 | default: |
1755 | WARN(1, "unexpected: %d", rma); | 1755 | WARN(1, "unexpected: %d", rma); |
1756 | } | 1756 | } |
1757 | goto out; | 1757 | return; |
1758 | } | 1758 | } |
1759 | 1759 | ||
1760 | mutex_unlock(&ifmgd->mtx); | 1760 | mutex_unlock(&ifmgd->mtx); |
@@ -1762,9 +1762,6 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1762 | if (skb->len >= 24 + 2 /* mgmt + deauth reason */ && | 1762 | if (skb->len >= 24 + 2 /* mgmt + deauth reason */ && |
1763 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) | 1763 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) |
1764 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); | 1764 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); |
1765 | |||
1766 | out: | ||
1767 | kfree_skb(skb); | ||
1768 | } | 1765 | } |
1769 | 1766 | ||
1770 | static void ieee80211_sta_timer(unsigned long data) | 1767 | static void ieee80211_sta_timer(unsigned long data) |