aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-12-08 16:23:31 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-08 16:23:31 -0500
commit393934c6b5c8d00f9d1ae20670d4a770f07a418a (patch)
treedad33cd2e4fc0e3d3b28dcbc36cfb44178cb046c /net
parent69f4aab1157d2a386e7ea4de77cc253629d1b4f2 (diff)
parent0a54917c3fc295cb61f3fb52373c173fd3b69f48 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts: drivers/net/wireless/ath/ath9k/ath9k.h drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/ath/ath9k/xmit.c
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/tx.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 5d6b0759d18..0ee56bb0ea7 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1746,15 +1746,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1746 int nh_pos, h_pos; 1746 int nh_pos, h_pos;
1747 struct sta_info *sta = NULL; 1747 struct sta_info *sta = NULL;
1748 u32 sta_flags = 0; 1748 u32 sta_flags = 0;
1749 struct sk_buff *tmp_skb;
1749 1750
1750 if (unlikely(skb->len < ETH_HLEN)) { 1751 if (unlikely(skb->len < ETH_HLEN)) {
1751 ret = NETDEV_TX_OK; 1752 ret = NETDEV_TX_OK;
1752 goto fail; 1753 goto fail;
1753 } 1754 }
1754 1755
1755 nh_pos = skb_network_header(skb) - skb->data;
1756 h_pos = skb_transport_header(skb) - skb->data;
1757
1758 /* convert Ethernet header to proper 802.11 header (based on 1756 /* convert Ethernet header to proper 802.11 header (based on
1759 * operation mode) */ 1757 * operation mode) */
1760 ethertype = (skb->data[12] << 8) | skb->data[13]; 1758 ethertype = (skb->data[12] << 8) | skb->data[13];
@@ -1927,6 +1925,20 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1927 goto fail; 1925 goto fail;
1928 } 1926 }
1929 1927
1928 /*
1929 * If the skb is shared we need to obtain our own copy.
1930 */
1931 if (skb_shared(skb)) {
1932 tmp_skb = skb;
1933 skb = skb_copy(skb, GFP_ATOMIC);
1934 kfree_skb(tmp_skb);
1935
1936 if (!skb) {
1937 ret = NETDEV_TX_OK;
1938 goto fail;
1939 }
1940 }
1941
1930 hdr.frame_control = fc; 1942 hdr.frame_control = fc;
1931 hdr.duration_id = 0; 1943 hdr.duration_id = 0;
1932 hdr.seq_ctrl = 0; 1944 hdr.seq_ctrl = 0;
@@ -1945,6 +1957,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1945 encaps_len = 0; 1957 encaps_len = 0;
1946 } 1958 }
1947 1959
1960 nh_pos = skb_network_header(skb) - skb->data;
1961 h_pos = skb_transport_header(skb) - skb->data;
1962
1948 skb_pull(skb, skip_header_bytes); 1963 skb_pull(skb, skip_header_bytes);
1949 nh_pos -= skip_header_bytes; 1964 nh_pos -= skip_header_bytes;
1950 h_pos -= skip_header_bytes; 1965 h_pos -= skip_header_bytes;