Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247675
b: refs/heads/master
c: 8b3beca
h: refs/heads/master
i:
  247673: 37554e3
  247671: 2275ddd
v: v3
  • Loading branch information
Yogesh Ashok Powar authored and John W. Linville committed May 16, 2011
1 parent 765f614 commit f3a9277
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57cf8043a64b56a10b9f194572548a3dfb62e596
refs/heads/master: 8b3becadc82de3b87a5c196239db3fef6caa9c82
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/iwmc3200wifi/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,8 @@ static void iwm_rx_process_amsdu(struct iwm_priv *iwm, struct sk_buff *skb)
IWM_HEXDUMP(iwm, DBG, RX, "A-MSDU: ", skb->data, skb->len);

__skb_queue_head_init(&list);
ieee80211_amsdu_to_8023s(skb, &list, ndev->dev_addr, wdev->iftype, 0);
ieee80211_amsdu_to_8023s(skb, &list, ndev->dev_addr, wdev->iftype, 0,
true);

while ((frame = __skb_dequeue(&list))) {
ndev->stats.rx_packets++;
Expand Down
4 changes: 3 additions & 1 deletion trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -2237,10 +2237,12 @@ int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr,
* @addr: The device MAC address.
* @iftype: The device interface type.
* @extra_headroom: The hardware extra headroom for SKBs in the @list.
* @has_80211_header: Set it true if SKB is with IEEE 802.11 header.
*/
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);
const unsigned int extra_headroom,
bool has_80211_header);

/**
* cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,7 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)

ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
rx->sdata->vif.type,
rx->local->hw.extra_tx_headroom);
rx->local->hw.extra_tx_headroom, true);

while (!skb_queue_empty(&frame_list)) {
rx->skb = __skb_dequeue(&frame_list);
Expand Down
21 changes: 13 additions & 8 deletions trunk/net/wireless/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ EXPORT_SYMBOL(ieee80211_data_from_8023);

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)
const unsigned int extra_headroom,
bool has_80211_header)
{
struct sk_buff *frame = NULL;
u16 ethertype;
Expand All @@ -553,14 +554,18 @@ void ieee80211_amsdu_to_8023s(struct sk_buff *skb, struct sk_buff_head *list,
int remaining, err;
u8 dst[ETH_ALEN], src[ETH_ALEN];

err = ieee80211_data_to_8023(skb, addr, iftype);
if (err)
goto out;
if (has_80211_header) {
err = ieee80211_data_to_8023(skb, addr, iftype);
if (err)
goto out;

/* skip the wrapping header */
eth = (struct ethhdr *) skb_pull(skb, sizeof(struct ethhdr));
if (!eth)
goto out;
/* skip the wrapping header */
eth = (struct ethhdr *) skb_pull(skb, sizeof(struct ethhdr));
if (!eth)
goto out;
} else {
eth = (struct ethhdr *) skb->data;
}

while (skb != frame) {
u8 padding;
Expand Down

0 comments on commit f3a9277

Please sign in to comment.