diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 16:38:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-02 16:38:27 -0400 |
commit | aecdc33e111b2c447b622e287c6003726daa1426 (patch) | |
tree | 3e7657eae4b785e1a1fb5dfb225dbae0b2f0cfc6 /net/wireless/mlme.c | |
parent | a20acf99f75e49271381d65db097c9763060a1e8 (diff) | |
parent | a3a6cab5ea10cca64d036851fe0d932448f2fe4f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller:
1) GRE now works over ipv6, from Dmitry Kozlov.
2) Make SCTP more network namespace aware, from Eric Biederman.
3) TEAM driver now works with non-ethernet devices, from Jiri Pirko.
4) Make openvswitch network namespace aware, from Pravin B Shelar.
5) IPV6 NAT implementation, from Patrick McHardy.
6) Server side support for TCP Fast Open, from Jerry Chu and others.
7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel
Borkmann.
8) Increate the loopback default MTU to 64K, from Eric Dumazet.
9) Use a per-task rather than per-socket page fragment allocator for
outgoing networking traffic. This benefits processes that have very
many mostly idle sockets, which is quite common.
From Eric Dumazet.
10) Use up to 32K for page fragment allocations, with fallbacks to
smaller sizes when higher order page allocations fail. Benefits are
a) less segments for driver to process b) less calls to page
allocator c) less waste of space.
From Eric Dumazet.
11) Allow GRO to be used on GRE tunnels, from Eric Dumazet.
12) VXLAN device driver, one way to handle VLAN issues such as the
limitation of 4096 VLAN IDs yet still have some level of isolation.
From Stephen Hemminger.
13) As usual there is a large boatload of driver changes, with the scale
perhaps tilted towards the wireless side this time around.
Fix up various fairly trivial conflicts, mostly caused by the user
namespace changes.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits)
hyperv: Add buffer for extended info after the RNDIS response message.
hyperv: Report actual status in receive completion packet
hyperv: Remove extra allocated space for recv_pkt_list elements
hyperv: Fix page buffer handling in rndis_filter_send_request()
hyperv: Fix the missing return value in rndis_filter_set_packet_filter()
hyperv: Fix the max_xfer_size in RNDIS initialization
vxlan: put UDP socket in correct namespace
vxlan: Depend on CONFIG_INET
sfc: Fix the reported priorities of different filter types
sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP
sfc: Fix loopback self-test with separate_tx_channels=1
sfc: Fix MCDI structure field lookup
sfc: Add parentheses around use of bitfield macro arguments
sfc: Fix null function pointer in efx_sriov_channel_type
vxlan: virtual extensible lan
igmp: export symbol ip_mc_leave_group
netlink: add attributes to fdb interface
tg3: unconditionally select HWMON support when tg3 is enabled.
Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT"
gre: fix sparse warning
...
Diffstat (limited to 'net/wireless/mlme.c')
-rw-r--r-- | net/wireless/mlme.c | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 1cdb1d5e6b0f..8016fee0752b 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -612,10 +612,21 @@ void cfg80211_del_sta(struct net_device *dev, const u8 *mac_addr, gfp_t gfp) | |||
612 | } | 612 | } |
613 | EXPORT_SYMBOL(cfg80211_del_sta); | 613 | EXPORT_SYMBOL(cfg80211_del_sta); |
614 | 614 | ||
615 | void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr, | ||
616 | enum nl80211_connect_failed_reason reason, | ||
617 | gfp_t gfp) | ||
618 | { | ||
619 | struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; | ||
620 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | ||
621 | |||
622 | nl80211_send_conn_failed_event(rdev, dev, mac_addr, reason, gfp); | ||
623 | } | ||
624 | EXPORT_SYMBOL(cfg80211_conn_failed); | ||
625 | |||
615 | struct cfg80211_mgmt_registration { | 626 | struct cfg80211_mgmt_registration { |
616 | struct list_head list; | 627 | struct list_head list; |
617 | 628 | ||
618 | u32 nlpid; | 629 | u32 nlportid; |
619 | 630 | ||
620 | int match_len; | 631 | int match_len; |
621 | 632 | ||
@@ -624,7 +635,7 @@ struct cfg80211_mgmt_registration { | |||
624 | u8 match[]; | 635 | u8 match[]; |
625 | }; | 636 | }; |
626 | 637 | ||
627 | int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, | 638 | int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_portid, |
628 | u16 frame_type, const u8 *match_data, | 639 | u16 frame_type, const u8 *match_data, |
629 | int match_len) | 640 | int match_len) |
630 | { | 641 | { |
@@ -672,7 +683,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, | |||
672 | 683 | ||
673 | memcpy(nreg->match, match_data, match_len); | 684 | memcpy(nreg->match, match_data, match_len); |
674 | nreg->match_len = match_len; | 685 | nreg->match_len = match_len; |
675 | nreg->nlpid = snd_pid; | 686 | nreg->nlportid = snd_portid; |
676 | nreg->frame_type = cpu_to_le16(frame_type); | 687 | nreg->frame_type = cpu_to_le16(frame_type); |
677 | list_add(&nreg->list, &wdev->mgmt_registrations); | 688 | list_add(&nreg->list, &wdev->mgmt_registrations); |
678 | 689 | ||
@@ -685,7 +696,7 @@ int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, | |||
685 | return err; | 696 | return err; |
686 | } | 697 | } |
687 | 698 | ||
688 | void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid) | 699 | void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlportid) |
689 | { | 700 | { |
690 | struct wiphy *wiphy = wdev->wiphy; | 701 | struct wiphy *wiphy = wdev->wiphy; |
691 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); | 702 | struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); |
@@ -694,7 +705,7 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid) | |||
694 | spin_lock_bh(&wdev->mgmt_registrations_lock); | 705 | spin_lock_bh(&wdev->mgmt_registrations_lock); |
695 | 706 | ||
696 | list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) { | 707 | list_for_each_entry_safe(reg, tmp, &wdev->mgmt_registrations, list) { |
697 | if (reg->nlpid != nlpid) | 708 | if (reg->nlportid != nlportid) |
698 | continue; | 709 | continue; |
699 | 710 | ||
700 | if (rdev->ops->mgmt_frame_register) { | 711 | if (rdev->ops->mgmt_frame_register) { |
@@ -710,8 +721,8 @@ void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid) | |||
710 | 721 | ||
711 | spin_unlock_bh(&wdev->mgmt_registrations_lock); | 722 | spin_unlock_bh(&wdev->mgmt_registrations_lock); |
712 | 723 | ||
713 | if (nlpid == wdev->ap_unexpected_nlpid) | 724 | if (nlportid == wdev->ap_unexpected_nlportid) |
714 | wdev->ap_unexpected_nlpid = 0; | 725 | wdev->ap_unexpected_nlportid = 0; |
715 | } | 726 | } |
716 | 727 | ||
717 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) | 728 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev) |
@@ -736,7 +747,6 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
736 | const u8 *buf, size_t len, bool no_cck, | 747 | const u8 *buf, size_t len, bool no_cck, |
737 | bool dont_wait_for_ack, u64 *cookie) | 748 | bool dont_wait_for_ack, u64 *cookie) |
738 | { | 749 | { |
739 | struct net_device *dev = wdev->netdev; | ||
740 | const struct ieee80211_mgmt *mgmt; | 750 | const struct ieee80211_mgmt *mgmt; |
741 | u16 stype; | 751 | u16 stype; |
742 | 752 | ||
@@ -796,7 +806,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
796 | case NL80211_IFTYPE_AP: | 806 | case NL80211_IFTYPE_AP: |
797 | case NL80211_IFTYPE_P2P_GO: | 807 | case NL80211_IFTYPE_P2P_GO: |
798 | case NL80211_IFTYPE_AP_VLAN: | 808 | case NL80211_IFTYPE_AP_VLAN: |
799 | if (!ether_addr_equal(mgmt->bssid, dev->dev_addr)) | 809 | if (!ether_addr_equal(mgmt->bssid, wdev_address(wdev))) |
800 | err = -EINVAL; | 810 | err = -EINVAL; |
801 | break; | 811 | break; |
802 | case NL80211_IFTYPE_MESH_POINT: | 812 | case NL80211_IFTYPE_MESH_POINT: |
@@ -809,6 +819,11 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
809 | * cfg80211 doesn't track the stations | 819 | * cfg80211 doesn't track the stations |
810 | */ | 820 | */ |
811 | break; | 821 | break; |
822 | case NL80211_IFTYPE_P2P_DEVICE: | ||
823 | /* | ||
824 | * fall through, P2P device only supports | ||
825 | * public action frames | ||
826 | */ | ||
812 | default: | 827 | default: |
813 | err = -EOPNOTSUPP; | 828 | err = -EOPNOTSUPP; |
814 | break; | 829 | break; |
@@ -819,7 +834,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
819 | return err; | 834 | return err; |
820 | } | 835 | } |
821 | 836 | ||
822 | if (!ether_addr_equal(mgmt->sa, dev->dev_addr)) | 837 | if (!ether_addr_equal(mgmt->sa, wdev_address(wdev))) |
823 | return -EINVAL; | 838 | return -EINVAL; |
824 | 839 | ||
825 | /* Transmit the Action frame as requested by user space */ | 840 | /* Transmit the Action frame as requested by user space */ |
@@ -868,7 +883,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm, | |||
868 | /* found match! */ | 883 | /* found match! */ |
869 | 884 | ||
870 | /* Indicate the received Action frame to user space */ | 885 | /* Indicate the received Action frame to user space */ |
871 | if (nl80211_send_mgmt(rdev, wdev, reg->nlpid, | 886 | if (nl80211_send_mgmt(rdev, wdev, reg->nlportid, |
872 | freq, sig_mbm, | 887 | freq, sig_mbm, |
873 | buf, len, gfp)) | 888 | buf, len, gfp)) |
874 | continue; | 889 | continue; |