diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 13:15:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-22 13:15:09 -0500 |
commit | 3051bf36c25d5153051704291782f8d44e744d36 (patch) | |
tree | 72dfc8a1d12675c6f2981d13102df954b678f11b /net/wireless/util.c | |
parent | 1e74a2eb1f5cc7f2f2b5aa9c9eeecbcf352220a3 (diff) | |
parent | 005c3490e9db23738d91e02788606c0fe4734723 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
"Highlights:
1) Support TX_RING in AF_PACKET TPACKET_V3 mode, from Sowmini
Varadhan.
2) Simplify classifier state on sk_buff in order to shrink it a bit.
From Willem de Bruijn.
3) Introduce SIPHASH and it's usage for secure sequence numbers and
syncookies. From Jason A. Donenfeld.
4) Reduce CPU usage for ICMP replies we are going to limit or
suppress, from Jesper Dangaard Brouer.
5) Introduce Shared Memory Communications socket layer, from Ursula
Braun.
6) Add RACK loss detection and allow it to actually trigger fast
recovery instead of just assisting after other algorithms have
triggered it. From Yuchung Cheng.
7) Add xmit_more and BQL support to mvneta driver, from Simon Guinot.
8) skb_cow_data avoidance in esp4 and esp6, from Steffen Klassert.
9) Export MPLS packet stats via netlink, from Robert Shearman.
10) Significantly improve inet port bind conflict handling, especially
when an application is restarted and changes it's setting of
reuseport. From Josef Bacik.
11) Implement TX batching in vhost_net, from Jason Wang.
12) Extend the dummy device so that VF (virtual function) features,
such as configuration, can be more easily tested. From Phil
Sutter.
13) Avoid two atomic ops per page on x86 in bnx2x driver, from Eric
Dumazet.
14) Add new bpf MAP, implementing a longest prefix match trie. From
Daniel Mack.
15) Packet sample offloading support in mlxsw driver, from Yotam Gigi.
16) Add new aquantia driver, from David VomLehn.
17) Add bpf tracepoints, from Daniel Borkmann.
18) Add support for port mirroring to b53 and bcm_sf2 drivers, from
Florian Fainelli.
19) Remove custom busy polling in many drivers, it is done in the core
networking since 4.5 times. From Eric Dumazet.
20) Support XDP adjust_head in virtio_net, from John Fastabend.
21) Fix several major holes in neighbour entry confirmation, from
Julian Anastasov.
22) Add XDP support to bnxt_en driver, from Michael Chan.
23) VXLAN offloads for enic driver, from Govindarajulu Varadarajan.
24) Add IPVTAP driver (IP-VLAN based tap driver) from Sainath Grandhi.
25) Support GRO in IPSEC protocols, from Steffen Klassert"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1764 commits)
Revert "ath10k: Search SMBIOS for OEM board file extension"
net: socket: fix recvmmsg not returning error from sock_error
bnxt_en: use eth_hw_addr_random()
bpf: fix unlocking of jited image when module ronx not set
arch: add ARCH_HAS_SET_MEMORY config
net: napi_watchdog() can use napi_schedule_irqoff()
tcp: Revert "tcp: tcp_probe: use spin_lock_bh()"
net/hsr: use eth_hw_addr_random()
net: mvpp2: enable building on 64-bit platforms
net: mvpp2: switch to build_skb() in the RX path
net: mvpp2: simplify MVPP2_PRS_RI_* definitions
net: mvpp2: fix indentation of MVPP2_EXT_GLOBAL_CTRL_DEFAULT
net: mvpp2: remove unused register definitions
net: mvpp2: simplify mvpp2_bm_bufs_add()
net: mvpp2: drop useless fields in mvpp2_bm_pool and related code
net: mvpp2: remove unused 'tx_skb' field of 'struct mvpp2_tx_queue'
net: mvpp2: release reference to txq_cpu[] entry after unmapping
net: mvpp2: handle too large value in mvpp2_rx_time_coal_set()
net: mvpp2: handle too large value handling in mvpp2_rx_pkts_coal_set()
net: mvpp2: remove useless arguments in mvpp2_rx_{pkts, time}_coal_set
...
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index e9d040d29846..68e5f2ecee1a 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -114,8 +114,7 @@ int ieee80211_frequency_to_channel(int freq) | |||
114 | } | 114 | } |
115 | EXPORT_SYMBOL(ieee80211_frequency_to_channel); | 115 | EXPORT_SYMBOL(ieee80211_frequency_to_channel); |
116 | 116 | ||
117 | struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, | 117 | struct ieee80211_channel *ieee80211_get_channel(struct wiphy *wiphy, int freq) |
118 | int freq) | ||
119 | { | 118 | { |
120 | enum nl80211_band band; | 119 | enum nl80211_band band; |
121 | struct ieee80211_supported_band *sband; | 120 | struct ieee80211_supported_band *sband; |
@@ -135,14 +134,13 @@ struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, | |||
135 | 134 | ||
136 | return NULL; | 135 | return NULL; |
137 | } | 136 | } |
138 | EXPORT_SYMBOL(__ieee80211_get_channel); | 137 | EXPORT_SYMBOL(ieee80211_get_channel); |
139 | 138 | ||
140 | static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, | 139 | static void set_mandatory_flags_band(struct ieee80211_supported_band *sband) |
141 | enum nl80211_band band) | ||
142 | { | 140 | { |
143 | int i, want; | 141 | int i, want; |
144 | 142 | ||
145 | switch (band) { | 143 | switch (sband->band) { |
146 | case NL80211_BAND_5GHZ: | 144 | case NL80211_BAND_5GHZ: |
147 | want = 3; | 145 | want = 3; |
148 | for (i = 0; i < sband->n_bitrates; i++) { | 146 | for (i = 0; i < sband->n_bitrates; i++) { |
@@ -192,6 +190,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, | |||
192 | WARN_ON((sband->ht_cap.mcs.rx_mask[0] & 0x1e) != 0x1e); | 190 | WARN_ON((sband->ht_cap.mcs.rx_mask[0] & 0x1e) != 0x1e); |
193 | break; | 191 | break; |
194 | case NUM_NL80211_BANDS: | 192 | case NUM_NL80211_BANDS: |
193 | default: | ||
195 | WARN_ON(1); | 194 | WARN_ON(1); |
196 | break; | 195 | break; |
197 | } | 196 | } |
@@ -203,7 +202,7 @@ void ieee80211_set_bitrate_flags(struct wiphy *wiphy) | |||
203 | 202 | ||
204 | for (band = 0; band < NUM_NL80211_BANDS; band++) | 203 | for (band = 0; band < NUM_NL80211_BANDS; band++) |
205 | if (wiphy->bands[band]) | 204 | if (wiphy->bands[band]) |
206 | set_mandatory_flags_band(wiphy->bands[band], band); | 205 | set_mandatory_flags_band(wiphy->bands[band]); |
207 | } | 206 | } |
208 | 207 | ||
209 | bool cfg80211_supported_cipher_suite(struct wiphy *wiphy, u32 cipher) | 208 | bool cfg80211_supported_cipher_suite(struct wiphy *wiphy, u32 cipher) |
@@ -619,8 +618,6 @@ int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, | |||
619 | 618 | ||
620 | if (pskb_expand_head(skb, head_need, 0, GFP_ATOMIC)) | 619 | if (pskb_expand_head(skb, head_need, 0, GFP_ATOMIC)) |
621 | return -ENOMEM; | 620 | return -ENOMEM; |
622 | |||
623 | skb->truesize += head_need; | ||
624 | } | 621 | } |
625 | 622 | ||
626 | if (encaps_data) { | 623 | if (encaps_data) { |
@@ -952,7 +949,7 @@ void cfg80211_process_wdev_events(struct wireless_dev *wdev) | |||
952 | ev->cr.resp_ie, ev->cr.resp_ie_len, | 949 | ev->cr.resp_ie, ev->cr.resp_ie_len, |
953 | ev->cr.status, | 950 | ev->cr.status, |
954 | ev->cr.status == WLAN_STATUS_SUCCESS, | 951 | ev->cr.status == WLAN_STATUS_SUCCESS, |
955 | ev->cr.bss); | 952 | ev->cr.bss, ev->cr.timeout_reason); |
956 | break; | 953 | break; |
957 | case EVENT_ROAMED: | 954 | case EVENT_ROAMED: |
958 | __cfg80211_roamed(wdev, ev->rm.bss, ev->rm.req_ie, | 955 | __cfg80211_roamed(wdev, ev->rm.bss, ev->rm.req_ie, |
@@ -1848,6 +1845,21 @@ void cfg80211_free_nan_func(struct cfg80211_nan_func *f) | |||
1848 | } | 1845 | } |
1849 | EXPORT_SYMBOL(cfg80211_free_nan_func); | 1846 | EXPORT_SYMBOL(cfg80211_free_nan_func); |
1850 | 1847 | ||
1848 | bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range, | ||
1849 | u32 center_freq_khz, u32 bw_khz) | ||
1850 | { | ||
1851 | u32 start_freq_khz, end_freq_khz; | ||
1852 | |||
1853 | start_freq_khz = center_freq_khz - (bw_khz / 2); | ||
1854 | end_freq_khz = center_freq_khz + (bw_khz / 2); | ||
1855 | |||
1856 | if (start_freq_khz >= freq_range->start_freq_khz && | ||
1857 | end_freq_khz <= freq_range->end_freq_khz) | ||
1858 | return true; | ||
1859 | |||
1860 | return false; | ||
1861 | } | ||
1862 | |||
1851 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | 1863 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ |
1852 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | 1864 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ |
1853 | const unsigned char rfc1042_header[] __aligned(2) = | 1865 | const unsigned char rfc1042_header[] __aligned(2) = |