diff options
| author | David S. Miller <davem@davemloft.net> | 2017-10-11 13:15:01 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-10-11 13:15:01 -0400 |
| commit | df2fd38a08272fcc2c658f2c4d7d6318e8da593e (patch) | |
| tree | 0573548f36917a3af84d571cac557da6f5eab032 /include/net | |
| parent | b8226962b1c49c784aeddb9d2fafbf53dfdc2190 (diff) | |
| parent | 90a53e4432b12288316efaa5f308adafb8d304b0 (diff) | |
Merge tag 'mac80211-next-for-davem-2017-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says:
====================
Work continues in various areas:
* port authorized event for 4-way-HS offload (Avi)
* enable MFP optional for such devices (Emmanuel)
* Kees's timer setup patch for mac80211 mesh
(the part that isn't trivially scripted)
* improve VLAN vs. TXQ handling (myself)
* load regulatory database as firmware file (myself)
* with various other small improvements and cleanups
I merged net-next once in the meantime to allow Kees's
timer setup patch to go in.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cfg80211.h | 40 | ||||
| -rw-r--r-- | include/net/fq.h | 7 | ||||
| -rw-r--r-- | include/net/fq_impl.h | 72 | ||||
| -rw-r--r-- | include/net/mac80211.h | 8 |
4 files changed, 97 insertions, 30 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index f12fa5245a45..8b8118a7fadb 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
| @@ -4347,19 +4347,6 @@ static inline int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, | |||
| 4347 | } | 4347 | } |
| 4348 | 4348 | ||
| 4349 | /** | 4349 | /** |
| 4350 | * ieee80211_data_from_8023 - convert an 802.3 frame to 802.11 | ||
| 4351 | * @skb: the 802.3 frame | ||
| 4352 | * @addr: the device MAC address | ||
| 4353 | * @iftype: the virtual interface type | ||
| 4354 | * @bssid: the network bssid (used only for iftype STATION and ADHOC) | ||
| 4355 | * @qos: build 802.11 QoS data frame | ||
| 4356 | * Return: 0 on success, or a negative error code. | ||
| 4357 | */ | ||
| 4358 | int ieee80211_data_from_8023(struct sk_buff *skb, const u8 *addr, | ||
| 4359 | enum nl80211_iftype iftype, const u8 *bssid, | ||
| 4360 | bool qos); | ||
| 4361 | |||
| 4362 | /** | ||
| 4363 | * ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame | 4350 | * ieee80211_amsdu_to_8023s - decode an IEEE 802.11n A-MSDU frame |
| 4364 | * | 4351 | * |
| 4365 | * Decode an IEEE 802.11 A-MSDU and convert it to a list of 802.3 frames. | 4352 | * Decode an IEEE 802.11 A-MSDU and convert it to a list of 802.3 frames. |
| @@ -5441,9 +5428,6 @@ cfg80211_connect_timeout(struct net_device *dev, const u8 *bssid, | |||
| 5441 | * @req_ie_len: association request IEs length | 5428 | * @req_ie_len: association request IEs length |
| 5442 | * @resp_ie: association response IEs (may be %NULL) | 5429 | * @resp_ie: association response IEs (may be %NULL) |
| 5443 | * @resp_ie_len: assoc response IEs length | 5430 | * @resp_ie_len: assoc response IEs length |
| 5444 | * @authorized: true if the 802.1X authentication was done by the driver or is | ||
| 5445 | * not needed (e.g., when Fast Transition protocol was used), false | ||
| 5446 | * otherwise. Ignored for networks that don't use 802.1X authentication. | ||
| 5447 | */ | 5431 | */ |
| 5448 | struct cfg80211_roam_info { | 5432 | struct cfg80211_roam_info { |
| 5449 | struct ieee80211_channel *channel; | 5433 | struct ieee80211_channel *channel; |
| @@ -5453,7 +5437,6 @@ struct cfg80211_roam_info { | |||
| 5453 | size_t req_ie_len; | 5437 | size_t req_ie_len; |
| 5454 | const u8 *resp_ie; | 5438 | const u8 *resp_ie; |
| 5455 | size_t resp_ie_len; | 5439 | size_t resp_ie_len; |
| 5456 | bool authorized; | ||
| 5457 | }; | 5440 | }; |
| 5458 | 5441 | ||
| 5459 | /** | 5442 | /** |
| @@ -5478,6 +5461,23 @@ void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info, | |||
| 5478 | gfp_t gfp); | 5461 | gfp_t gfp); |
| 5479 | 5462 | ||
| 5480 | /** | 5463 | /** |
| 5464 | * cfg80211_port_authorized - notify cfg80211 of successful security association | ||
| 5465 | * | ||
| 5466 | * @dev: network device | ||
| 5467 | * @bssid: the BSSID of the AP | ||
| 5468 | * @gfp: allocation flags | ||
| 5469 | * | ||
| 5470 | * This function should be called by a driver that supports 4 way handshake | ||
| 5471 | * offload after a security association was successfully established (i.e., | ||
| 5472 | * the 4 way handshake was completed successfully). The call to this function | ||
| 5473 | * should be preceded with a call to cfg80211_connect_result(), | ||
| 5474 | * cfg80211_connect_done(), cfg80211_connect_bss() or cfg80211_roamed() to | ||
| 5475 | * indicate the 802.11 association. | ||
| 5476 | */ | ||
| 5477 | void cfg80211_port_authorized(struct net_device *dev, const u8 *bssid, | ||
| 5478 | gfp_t gfp); | ||
| 5479 | |||
| 5480 | /** | ||
| 5481 | * cfg80211_disconnected - notify cfg80211 that connection was dropped | 5481 | * cfg80211_disconnected - notify cfg80211 that connection was dropped |
| 5482 | * | 5482 | * |
| 5483 | * @dev: network device | 5483 | * @dev: network device |
| @@ -5934,7 +5934,8 @@ int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len, | |||
| 5934 | * @ies: the IE buffer | 5934 | * @ies: the IE buffer |
| 5935 | * @ielen: the length of the IE buffer | 5935 | * @ielen: the length of the IE buffer |
| 5936 | * @ids: an array with element IDs that are allowed before | 5936 | * @ids: an array with element IDs that are allowed before |
| 5937 | * the split | 5937 | * the split. A WLAN_EID_EXTENSION value means that the next |
| 5938 | * EID in the list is a sub-element of the EXTENSION IE. | ||
| 5938 | * @n_ids: the size of the element ID array | 5939 | * @n_ids: the size of the element ID array |
| 5939 | * @after_ric: array IE types that come after the RIC element | 5940 | * @after_ric: array IE types that come after the RIC element |
| 5940 | * @n_after_ric: size of the @after_ric array | 5941 | * @n_after_ric: size of the @after_ric array |
| @@ -5965,7 +5966,8 @@ size_t ieee80211_ie_split_ric(const u8 *ies, size_t ielen, | |||
| 5965 | * @ies: the IE buffer | 5966 | * @ies: the IE buffer |
| 5966 | * @ielen: the length of the IE buffer | 5967 | * @ielen: the length of the IE buffer |
| 5967 | * @ids: an array with element IDs that are allowed before | 5968 | * @ids: an array with element IDs that are allowed before |
| 5968 | * the split | 5969 | * the split. A WLAN_EID_EXTENSION value means that the next |
| 5970 | * EID in the list is a sub-element of the EXTENSION IE. | ||
| 5969 | * @n_ids: the size of the element ID array | 5971 | * @n_ids: the size of the element ID array |
| 5970 | * @offset: offset where to start splitting in the buffer | 5972 | * @offset: offset where to start splitting in the buffer |
| 5971 | * | 5973 | * |
diff --git a/include/net/fq.h b/include/net/fq.h index 6d8521a30c5c..ac944a686840 100644 --- a/include/net/fq.h +++ b/include/net/fq.h | |||
| @@ -90,6 +90,13 @@ typedef void fq_skb_free_t(struct fq *, | |||
| 90 | struct fq_flow *, | 90 | struct fq_flow *, |
| 91 | struct sk_buff *); | 91 | struct sk_buff *); |
| 92 | 92 | ||
| 93 | /* Return %true to filter (drop) the frame. */ | ||
| 94 | typedef bool fq_skb_filter_t(struct fq *, | ||
| 95 | struct fq_tin *, | ||
| 96 | struct fq_flow *, | ||
| 97 | struct sk_buff *, | ||
| 98 | void *); | ||
| 99 | |||
| 93 | typedef struct fq_flow *fq_flow_get_default_t(struct fq *, | 100 | typedef struct fq_flow *fq_flow_get_default_t(struct fq *, |
| 94 | struct fq_tin *, | 101 | struct fq_tin *, |
| 95 | int idx, | 102 | int idx, |
diff --git a/include/net/fq_impl.h b/include/net/fq_impl.h index 4e6131cd3f43..8b237e4afee6 100644 --- a/include/net/fq_impl.h +++ b/include/net/fq_impl.h | |||
| @@ -12,24 +12,22 @@ | |||
| 12 | 12 | ||
| 13 | /* functions that are embedded into includer */ | 13 | /* functions that are embedded into includer */ |
| 14 | 14 | ||
| 15 | static struct sk_buff *fq_flow_dequeue(struct fq *fq, | 15 | static void fq_adjust_removal(struct fq *fq, |
| 16 | struct fq_flow *flow) | 16 | struct fq_flow *flow, |
| 17 | struct sk_buff *skb) | ||
| 17 | { | 18 | { |
| 18 | struct fq_tin *tin = flow->tin; | 19 | struct fq_tin *tin = flow->tin; |
| 19 | struct fq_flow *i; | ||
| 20 | struct sk_buff *skb; | ||
| 21 | |||
| 22 | lockdep_assert_held(&fq->lock); | ||
| 23 | |||
| 24 | skb = __skb_dequeue(&flow->queue); | ||
| 25 | if (!skb) | ||
| 26 | return NULL; | ||
| 27 | 20 | ||
| 28 | tin->backlog_bytes -= skb->len; | 21 | tin->backlog_bytes -= skb->len; |
| 29 | tin->backlog_packets--; | 22 | tin->backlog_packets--; |
| 30 | flow->backlog -= skb->len; | 23 | flow->backlog -= skb->len; |
| 31 | fq->backlog--; | 24 | fq->backlog--; |
| 32 | fq->memory_usage -= skb->truesize; | 25 | fq->memory_usage -= skb->truesize; |
| 26 | } | ||
| 27 | |||
| 28 | static void fq_rejigger_backlog(struct fq *fq, struct fq_flow *flow) | ||
| 29 | { | ||
| 30 | struct fq_flow *i; | ||
| 33 | 31 | ||
| 34 | if (flow->backlog == 0) { | 32 | if (flow->backlog == 0) { |
| 35 | list_del_init(&flow->backlogchain); | 33 | list_del_init(&flow->backlogchain); |
| @@ -43,6 +41,21 @@ static struct sk_buff *fq_flow_dequeue(struct fq *fq, | |||
| 43 | list_move_tail(&flow->backlogchain, | 41 | list_move_tail(&flow->backlogchain, |
| 44 | &i->backlogchain); | 42 | &i->backlogchain); |
| 45 | } | 43 | } |
| 44 | } | ||
| 45 | |||
| 46 | static struct sk_buff *fq_flow_dequeue(struct fq *fq, | ||
| 47 | struct fq_flow *flow) | ||
| 48 | { | ||
| 49 | struct sk_buff *skb; | ||
| 50 | |||
| 51 | lockdep_assert_held(&fq->lock); | ||
| 52 | |||
| 53 | skb = __skb_dequeue(&flow->queue); | ||
| 54 | if (!skb) | ||
| 55 | return NULL; | ||
| 56 | |||
| 57 | fq_adjust_removal(fq, flow, skb); | ||
| 58 | fq_rejigger_backlog(fq, flow); | ||
| 46 | 59 | ||
| 47 | return skb; | 60 | return skb; |
| 48 | } | 61 | } |
| @@ -188,6 +201,45 @@ static void fq_tin_enqueue(struct fq *fq, | |||
| 188 | } | 201 | } |
| 189 | } | 202 | } |
| 190 | 203 | ||
| 204 | static void fq_flow_filter(struct fq *fq, | ||
| 205 | struct fq_flow *flow, | ||
| 206 | fq_skb_filter_t filter_func, | ||
| 207 | void *filter_data, | ||
| 208 | fq_skb_free_t free_func) | ||
| 209 | { | ||
| 210 | struct fq_tin *tin = flow->tin; | ||
| 211 | struct sk_buff *skb, *tmp; | ||
| 212 | |||
| 213 | lockdep_assert_held(&fq->lock); | ||
| 214 | |||
| 215 | skb_queue_walk_safe(&flow->queue, skb, tmp) { | ||
| 216 | if (!filter_func(fq, tin, flow, skb, filter_data)) | ||
| 217 | continue; | ||
| 218 | |||
| 219 | __skb_unlink(skb, &flow->queue); | ||
