wireless: add ieee80211_amsdu_to_8023s
Move the A-MSDU handling code from mac80211 to cfg80211 so that more drivers can use it. The new created function ieee80211_amsdu_to_8023s converts an A-MSDU frame to a list of 802.3 frames. Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
ca99861d54
commit
eaf85ca7fe
3 changed files with 138 additions and 91 deletions
|
@ -1578,7 +1578,7 @@ unsigned int ieee80211_hdrlen(__le16 fc);
|
|||
* @addr: the device MAC address
|
||||
* @iftype: the virtual interface type
|
||||
*/
|
||||
int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr,
|
||||
int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
|
||||
enum nl80211_iftype iftype);
|
||||
|
||||
/**
|
||||
|
@ -1589,9 +1589,27 @@ int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr,
|
|||
* @bssid: the network bssid (used only for iftype STATION and ADHOC)
|
||||
* @qos: build 802.11 QoS data frame
|
||||
*/
|
||||
int ieee80211_data_from_8023(struct sk_buff *skb, u8 *addr,
|
||||
int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
|
||||
enum nl80211_iftype iftype, u8 *bssid, bool qos);
|
||||
|
||||
/**
|
||||
* ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame
|
||||
*
|
||||
* Decode an IEEE 802.11n A-MSDU frame and convert it to a list of
|
||||
* 802.3 frames. The @list will be empty if the decode fails. The
|
||||
* @skb is consumed after the function returns.
|
||||
*
|
||||
* @skb: The input IEEE 802.11n A-MSDU frame.
|
||||
* @list: The output list of 802.3 frames. It must be allocated and
|
||||
* initialized by by the caller.
|
||||
* @addr: The device MAC address.
|
||||
* @iftype: The device interface type.
|
||||
* @extra_headroom: The hardware extra headroom for SKBs in the @list.
|
||||
*/
|
||||
void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
|
||||
const u8 *addr, enum nl80211_iftype iftype,
|
||||
const unsigned int extra_headroom);
|
||||
|
||||
/**
|
||||
* cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
|
||||
* @skb: the data frame
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue