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>
This commit is contained in:
parent
1fa57d0173
commit
36b3a628a4
|
@ -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);
|
ieee80211_rx_mgmt_auth_ibss(sdata, mgmt, skb->len);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree_skb(skb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata)
|
void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata)
|
||||||
|
|
|
@ -738,9 +738,10 @@ static void ieee80211_iface_work(struct work_struct *work)
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WARN(1, "frame for unexpected interface type");
|
WARN(1, "frame for unexpected interface type");
|
||||||
kfree_skb(skb);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kfree_skb(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* then other type-dependent work */
|
/* then other type-dependent work */
|
||||||
|
|
|
@ -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);
|
ieee80211_mesh_rx_mgmt_action(sdata, mgmt, skb->len, rx_status);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree_skb(skb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
|
void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
|
||||||
|
|
|
@ -1754,7 +1754,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
|
||||||
default:
|
default:
|
||||||
WARN(1, "unexpected: %d", rma);
|
WARN(1, "unexpected: %d", rma);
|
||||||
}
|
}
|
||||||
goto out;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
mutex_unlock(&ifmgd->mtx);
|
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 */ &&
|
if (skb->len >= 24 + 2 /* mgmt + deauth reason */ &&
|
||||||
(fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH)
|
(fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH)
|
||||||
cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
|
cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len);
|
||||||
|
|
||||||
out:
|
|
||||||
kfree_skb(skb);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ieee80211_sta_timer(unsigned long data)
|
static void ieee80211_sta_timer(unsigned long data)
|
||||||
|
|
Loading…
Reference in New Issue