Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-davem-2016-04-06' of git://git.kernel.or…
Browse files Browse the repository at this point in the history
…g/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg says:

====================
For the 4.7 cycle, we have a number of changes:
 * Bob's mesh mode rhashtable conversion, this includes
   the rhashtable API change for allocation flags
 * BSSID scan, connect() command reassoc support (Jouni)
 * fast (optimised data only) and support for RSS in mac80211 (myself)
 * various smaller changes
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 8, 2016
2 parents 0701615 + 4ce2bd9 commit 1089ac6
Show file tree
Hide file tree
Showing 55 changed files with 2,029 additions and 1,005 deletions.
17 changes: 15 additions & 2 deletions Documentation/networking/mac80211-injection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,27 @@ radiotap headers and used to control injection:
HT rate for the transmission (only for devices without own rate control).
Also some flags are parsed

IEEE80211_TX_RC_SHORT_GI: use short guard interval
IEEE80211_TX_RC_40_MHZ_WIDTH: send in HT40 mode
IEEE80211_RADIOTAP_MCS_SGI: use short guard interval
IEEE80211_RADIOTAP_MCS_BW_40: send in HT40 mode

* IEEE80211_RADIOTAP_DATA_RETRIES

number of retries when either IEEE80211_RADIOTAP_RATE or
IEEE80211_RADIOTAP_MCS was used

* IEEE80211_RADIOTAP_VHT

VHT mcs and number of streams used in the transmission (only for devices
without own rate control). Also other fields are parsed

flags field
IEEE80211_RADIOTAP_VHT_FLAG_SGI: use short guard interval

bandwidth field
1: send using 40MHz channel width
4: send using 80MHz channel width
11: send using 160MHz channel width

The injection code can also skip all other currently defined radiotap fields
facilitating replay of captured radiotap headers directly.

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath10k/htt_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ static void ath10k_process_rx(struct ath10k *ar,
*status = *rx_status;

ath10k_dbg(ar, ATH10K_DBG_DATA,
"rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
"rx skb %p len %u peer %pM %s %s sn %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%llx fcs-err %i mic-err %i amsdu-more %i\n",
skb,
skb->len,
ieee80211_get_SA(hdr),
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/wcn36xx/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
RX_FLAG_MMIC_STRIPPED |
RX_FLAG_DECRYPTED;

wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag);
wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%llx\n", status.flag);

memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/dvm/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,

memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));

ieee80211_rx_napi(priv->hw, skb, priv->napi);
ieee80211_rx_napi(priv->hw, NULL, skb, priv->napi);
}

static u32 iwlagn_translate_rx_status(struct iwl_priv *priv, u32 decrypt_in)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1499,5 +1499,5 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));

/* pass it as regular rx to mac80211 */
ieee80211_rx_napi(mvm->hw, skb, NULL);
ieee80211_rx_napi(mvm->hw, NULL, skb, NULL);
}
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
fraglen, rxb->truesize);
}

ieee80211_rx_napi(mvm->hw, skb, napi);
ieee80211_rx_napi(mvm->hw, NULL, skb, napi);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
if (iwl_mvm_check_pn(mvm, skb, queue, sta))
kfree_skb(skb);
else
ieee80211_rx_napi(mvm->hw, skb, napi);
ieee80211_rx_napi(mvm->hw, NULL, skb, napi);
}

static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
Expand Down
5 changes: 5 additions & 0 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,7 @@ static void hw_scan_work(struct work_struct *work)
/* send probes */
for (i = 0; i < req->n_ssids; i++) {
struct sk_buff *probe;
struct ieee80211_mgmt *mgmt;

probe = ieee80211_probereq_get(hwsim->hw,
hwsim->scan_addr,
Expand All @@ -1918,6 +1919,10 @@ static void hw_scan_work(struct work_struct *work)
if (!probe)
continue;

mgmt = (struct ieee80211_mgmt *) probe->data;
memcpy(mgmt->da, req->bssid, ETH_ALEN);
memcpy(mgmt->bssid, req->bssid, ETH_ALEN);

if (req->ie_len)
memcpy(skb_put(probe, req->ie_len), req->ie,
req->ie_len);
Expand Down
4 changes: 2 additions & 2 deletions fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ static int gfs2_glocks_open(struct inode *inode, struct file *file)
if (seq->buf)
seq->size = GFS2_SEQ_GOODSIZE;
gi->gl = NULL;
ret = rhashtable_walk_init(&gl_hash_table, &gi->hti);
ret = rhashtable_walk_init(&gl_hash_table, &gi->hti, GFP_KERNEL);
}
return ret;
}
Expand Down Expand Up @@ -1941,7 +1941,7 @@ static int gfs2_glstats_open(struct inode *inode, struct file *file)
if (seq->buf)
seq->size = GFS2_SEQ_GOODSIZE;
gi->gl = NULL;
ret = rhashtable_walk_init(&gl_hash_table, &gi->hti);
ret = rhashtable_walk_init(&gl_hash_table, &gi->hti, GFP_KERNEL);
}
return ret;
}
Expand Down
24 changes: 24 additions & 0 deletions include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Copyright (c) 2005, Devicescape Software, Inc.
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
* Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH
* Copyright (c) 2016 Intel Deutschland GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
Expand Down Expand Up @@ -163,6 +164,9 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
/* 30 byte 4 addr hdr, 2 byte QoS, 2304 byte MSDU, 12 byte crypt, 4 byte FCS */
#define IEEE80211_MAX_FRAME_LEN 2352

/* Maximal size of an A-MSDU that can be transported in a HT BA session */
#define IEEE80211_MAX_MPDU_LEN_HT_BA 4095

/* Maximal size of an A-MSDU */
#define IEEE80211_MAX_MPDU_LEN_HT_3839 3839
#define IEEE80211_MAX_MPDU_LEN_HT_7935 7935
Expand Down Expand Up @@ -637,6 +641,16 @@ static inline bool ieee80211_is_first_frag(__le16 seq_ctrl)
return (seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG)) == 0;
}

/**
* ieee80211_is_frag - check if a frame is a fragment
* @hdr: 802.11 header of the frame
*/
static inline bool ieee80211_is_frag(struct ieee80211_hdr *hdr)
{
return ieee80211_has_morefrags(hdr->frame_control) ||
hdr->seq_ctrl & cpu_to_le16(IEEE80211_SCTL_FRAG);
}

struct ieee80211s_hdr {
u8 flags;
u8 ttl;
Expand Down Expand Up @@ -1011,6 +1025,16 @@ struct ieee80211_mgmt {
u8 tpc_elem_length;
struct ieee80211_tpc_report_ie tpc;
} __packed tpc_report;
struct {
u8 action_code;
u8 dialog_token;
u8 follow_up;
u8 tod[6];
u8 toa[6];
__le16 tod_error;
__le16 toa_error;
u8 variable[0];
} __packed ftm;
} u;
} __packed action;
} u;
Expand Down
3 changes: 2 additions & 1 deletion include/linux/rhashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ struct bucket_table *rhashtable_insert_slow(struct rhashtable *ht,
struct bucket_table *old_tbl);
int rhashtable_insert_rehash(struct rhashtable *ht, struct bucket_table *tbl);

int rhashtable_walk_init(struct rhashtable *ht, struct rhashtable_iter *iter);
int rhashtable_walk_init(struct rhashtable *ht, struct rhashtable_iter *iter,
gfp_t gfp);
void rhashtable_walk_exit(struct rhashtable_iter *iter);
int rhashtable_walk_start(struct rhashtable_iter *iter) __acquires(RCU);
void *rhashtable_walk_next(struct rhashtable_iter *iter);
Expand Down
42 changes: 41 additions & 1 deletion include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ enum station_parameters_apply_mask {
* @supported_oper_classes_len: number of supported operating classes
* @opmode_notif: operating mode field from Operating Mode Notification
* @opmode_notif_used: information if operating mode field is used
* @support_p2p_ps: information if station supports P2P PS mechanism
*/
struct station_parameters {
const u8 *supported_rates;
Expand All @@ -841,6 +842,7 @@ struct station_parameters {
u8 supported_oper_classes_len;
u8 opmode_notif;
bool opmode_notif_used;
int support_p2p_ps;
};

/**
Expand Down Expand Up @@ -1455,6 +1457,7 @@ struct cfg80211_ssid {
* @mac_addr_mask: MAC address mask used with randomisation, bits that
* are 0 in the mask should be randomised, bits that are 1 should
* be taken from the @mac_addr
* @bssid: BSSID to scan for (most commonly, the wildcard BSSID)
*/
struct cfg80211_scan_request {
struct cfg80211_ssid *ssids;
Expand All @@ -1471,6 +1474,7 @@ struct cfg80211_scan_request {

u8 mac_addr[ETH_ALEN] __aligned(2);
u8 mac_addr_mask[ETH_ALEN] __aligned(2);
u8 bssid[ETH_ALEN] __aligned(2);

/* internal */
struct wiphy *wiphy;
Expand Down Expand Up @@ -1617,7 +1621,7 @@ struct cfg80211_inform_bss {
};

/**
* struct cfg80211_bss_ie_data - BSS entry IE data
* struct cfg80211_bss_ies - BSS entry IE data
* @tsf: TSF contained in the frame that carried these IEs
* @rcu_head: internal use, for freeing
* @len: length of the IEs
Expand Down Expand Up @@ -1856,6 +1860,33 @@ struct cfg80211_ibss_params {
struct ieee80211_ht_cap ht_capa_mask;
};

/**
* struct cfg80211_bss_select_adjust - BSS selection with RSSI adjustment.
*
* @band: band of BSS which should match for RSSI level adjustment.
* @delta: value of RSSI level adjustment.
*/
struct cfg80211_bss_select_adjust {
enum ieee80211_band band;
s8 delta;
};

/**
* struct cfg80211_bss_selection - connection parameters for BSS selection.
*
* @behaviour: requested BSS selection behaviour.
* @param: parameters for requestion behaviour.
* @band_pref: preferred band for %NL80211_BSS_SELECT_ATTR_BAND_PREF.
* @adjust: parameters for %NL80211_BSS_SELECT_ATTR_RSSI_ADJUST.
*/
struct cfg80211_bss_selection {
enum nl80211_bss_select_attr behaviour;
union {
enum ieee80211_band band_pref;
struct cfg80211_bss_select_adjust adjust;
} param;
};

/**
* struct cfg80211_connect_params - Connection parameters
*
Expand Down Expand Up @@ -1893,6 +1924,8 @@ struct cfg80211_ibss_params {
* @vht_capa_mask: The bits of vht_capa which are to be used.
* @pbss: if set, connect to a PCP instead of AP. Valid for DMG
* networks.
* @bss_select: criteria to be used for BSS selection.
* @prev_bssid: previous BSSID, if not %NULL use reassociate frame
*/
struct cfg80211_connect_params {
struct ieee80211_channel *channel;
Expand All @@ -1916,6 +1949,8 @@ struct cfg80211_connect_params {
struct ieee80211_vht_cap vht_capa;
struct ieee80211_vht_cap vht_capa_mask;
bool pbss;
struct cfg80211_bss_selection bss_select;
const u8 *prev_bssid;
};

/**
Expand Down Expand Up @@ -3184,6 +3219,9 @@ struct wiphy_vendor_command {
* low rssi when a frame is heard on different channel, then it should set
* this variable to the maximal offset for which it can compensate.
* This value should be set in MHz.
* @bss_select_support: bitmask indicating the BSS selection criteria supported
* by the driver in the .connect() callback. The bit position maps to the
* attribute indices defined in &enum nl80211_bss_select_attr.
*/
struct wiphy {
/* assign these fields before you register the wiphy */
Expand Down Expand Up @@ -3306,6 +3344,8 @@ struct wiphy {
u8 max_num_csa_counters;
u8 max_adj_channel_rssi_comp;

u32 bss_select_support;

char priv[0] __aligned(NETDEV_ALIGN);
};

Expand Down
Loading

0 comments on commit 1089ac6

Please sign in to comment.