diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-14 20:33:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-12-14 20:33:40 -0500 |
commit | b4fe2a03422e6bd20bd8df5e428109a85c9ea961 (patch) | |
tree | b6505c0599251421fef39c9fa0655f255aac9ed6 /net/mac80211 | |
parent | 85cb7f1264c4d9e60ccdce52740238222e77ccd0 (diff) | |
parent | 2a27a03d3a891e87ca33d27a858b4db734a4cbab (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (75 commits)
pppoe.c: Fix kernel panic caused by __pppoe_xmit
WAN: Fix a TX IRQ causing BUG() in PC300 and PCI200SYN drivers.
bnx2x: Advance a version number to 1.60.01-0
bnx2x: Fixed a compilation warning
bnx2x: LSO code was broken on BE platforms
qlge: Fix deadlock when cancelling worker.
net: fix skb_defer_rx_timestamp()
cxgb4vf: Ingress Queue Entry Size needs to be 64 bytes
phy: add the IC+ IP1001 driver
atm: correct sysfs 'device' link creation and parent relationships
MAINTAINERS: remove me from tulip
SCTP: Fix SCTP_SET_PEER_PRIMARY_ADDR to accpet v4mapped address
enic: Bug Fix: Pass napi reference to the isr that services receive queue
ipv6: fix nl group when advertising a new link
connector: add module alias
net: Document the kernel_recvmsg() function
r8169: Fix runtime power management
hso: IP checksuming doesn't work on GE0301 option cards
xfrm: Fix xfrm_state_migrate leak
net: Convert netpoll blocking api in bonding driver to be a counter
...
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/rx.c | 6 | ||||
-rw-r--r-- | net/mac80211/tx.c | 28 |
2 files changed, 30 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 902b03ee8f60..54fb4a0e76f0 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2247,6 +2247,10 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) | |||
2247 | break; | 2247 | break; |
2248 | case cpu_to_le16(IEEE80211_STYPE_DEAUTH): | 2248 | case cpu_to_le16(IEEE80211_STYPE_DEAUTH): |
2249 | case cpu_to_le16(IEEE80211_STYPE_DISASSOC): | 2249 | case cpu_to_le16(IEEE80211_STYPE_DISASSOC): |
2250 | if (is_multicast_ether_addr(mgmt->da) && | ||
2251 | !is_broadcast_ether_addr(mgmt->da)) | ||
2252 | return RX_DROP_MONITOR; | ||
2253 | |||
2250 | /* process only for station */ | 2254 | /* process only for station */ |
2251 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 2255 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
2252 | return RX_DROP_MONITOR; | 2256 | return RX_DROP_MONITOR; |
@@ -2741,6 +2745,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
2741 | 2745 | ||
2742 | if (ieee80211_prepare_and_rx_handle(&rx, skb, true)) | 2746 | if (ieee80211_prepare_and_rx_handle(&rx, skb, true)) |
2743 | return; | 2747 | return; |
2748 | goto out; | ||
2744 | } | 2749 | } |
2745 | } | 2750 | } |
2746 | 2751 | ||
@@ -2780,6 +2785,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
2780 | return; | 2785 | return; |
2781 | } | 2786 | } |
2782 | 2787 | ||
2788 | out: | ||
2783 | dev_kfree_skb(skb); | 2789 | dev_kfree_skb(skb); |
2784 | } | 2790 | } |
2785 | 2791 | ||
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 96c594309506..7a637b80a62e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1587,7 +1587,12 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, | |||
1587 | list) { | 1587 | list) { |
1588 | if (!ieee80211_sdata_running(tmp_sdata)) | 1588 | if (!ieee80211_sdata_running(tmp_sdata)) |
1589 | continue; | 1589 | continue; |
1590 | if (tmp_sdata->vif.type != NL80211_IFTYPE_AP) | 1590 | if (tmp_sdata->vif.type == |
1591 | NL80211_IFTYPE_MONITOR || | ||
1592 | tmp_sdata->vif.type == | ||
1593 | NL80211_IFTYPE_AP_VLAN || | ||
1594 | tmp_sdata->vif.type == | ||
1595 | NL80211_IFTYPE_WDS) | ||
1591 | continue; | 1596 | continue; |
1592 | if (compare_ether_addr(tmp_sdata->vif.addr, | 1597 | if (compare_ether_addr(tmp_sdata->vif.addr, |
1593 | hdr->addr2) == 0) { | 1598 | hdr->addr2) == 0) { |
@@ -1732,15 +1737,13 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1732 | int nh_pos, h_pos; | 1737 | int nh_pos, h_pos; |
1733 | struct sta_info *sta = NULL; | 1738 | struct sta_info *sta = NULL; |
1734 | u32 sta_flags = 0; | 1739 | u32 sta_flags = 0; |
1740 | struct sk_buff *tmp_skb; | ||
1735 | 1741 | ||
1736 | if (unlikely(skb->len < ETH_HLEN)) { | 1742 | if (unlikely(skb->len < ETH_HLEN)) { |
1737 | ret = NETDEV_TX_OK; | 1743 | ret = NETDEV_TX_OK; |
1738 | goto fail; | 1744 | goto fail; |
1739 | } | 1745 | } |
1740 | 1746 | ||
1741 | nh_pos = skb_network_header(skb) - skb->data; | ||
1742 | h_pos = skb_transport_header(skb) - skb->data; | ||
1743 | |||
1744 | /* convert Ethernet header to proper 802.11 header (based on | 1747 | /* convert Ethernet header to proper 802.11 header (based on |
1745 | * operation mode) */ | 1748 | * operation mode) */ |
1746 | ethertype = (skb->data[12] << 8) | skb->data[13]; | 1749 | ethertype = (skb->data[12] << 8) | skb->data[13]; |
@@ -1913,6 +1916,20 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1913 | goto fail; | 1916 | goto fail; |
1914 | } | 1917 | } |
1915 | 1918 | ||
1919 | /* | ||
1920 | * If the skb is shared we need to obtain our own copy. | ||
1921 | */ | ||
1922 | if (skb_shared(skb)) { | ||
1923 | tmp_skb = skb; | ||
1924 | skb = skb_copy(skb, GFP_ATOMIC); | ||
1925 | kfree_skb(tmp_skb); | ||
1926 | |||
1927 | if (!skb) { | ||
1928 | ret = NETDEV_TX_OK; | ||
1929 | goto fail; | ||
1930 | } | ||
1931 | } | ||
1932 | |||
1916 | hdr.frame_control = fc; | 1933 | hdr.frame_control = fc; |
1917 | hdr.duration_id = 0; | 1934 | hdr.duration_id = 0; |
1918 | hdr.seq_ctrl = 0; | 1935 | hdr.seq_ctrl = 0; |
@@ -1931,6 +1948,9 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1931 | encaps_len = 0; | 1948 | encaps_len = 0; |
1932 | } | 1949 | } |
1933 | 1950 | ||
1951 | nh_pos = skb_network_header(skb) - skb->data; | ||
1952 | h_pos = skb_transport_header(skb) - skb->data; | ||
1953 | |||
1934 | skb_pull(skb, skip_header_bytes); | 1954 | skb_pull(skb, skip_header_bytes); |
1935 | nh_pos -= skip_header_bytes; | 1955 | nh_pos -= skip_header_bytes; |
1936 | h_pos -= skip_header_bytes; | 1956 | h_pos -= skip_header_bytes; |