Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-davem-2017-02-09' 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:

====================
Some more updates:
 * use shash in mac80211 crypto code where applicable
 * some documentation fixes
 * pass RSSI levels up in change notifications
 * remove unused rfkill-regulator
 * various other cleanups
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 10, 2017
2 parents 1deeaa0 + f181d6a commit 0d2164a
Show file tree
Hide file tree
Showing 34 changed files with 559 additions and 843 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/intel/iwlwifi/mvm/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
ieee80211_cqm_rssi_notify(
vif,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
sig,
GFP_KERNEL);
} else if (sig > thold &&
(last_event == 0 || sig > last_event + hyst)) {
Expand All @@ -595,6 +596,7 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
ieee80211_cqm_rssi_notify(
vif,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig,
GFP_KERNEL);
}
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/marvell/mwifiex/sta_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
case EVENT_RSSI_LOW:
cfg80211_cqm_rssi_notify(priv->netdev,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
GFP_KERNEL);
0, GFP_KERNEL);
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO,
HostCmd_ACT_GEN_GET, 0, NULL, false);
priv->subsc_evt_rssi_state = RSSI_LOW_RECVD;
Expand All @@ -839,7 +839,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
case EVENT_RSSI_HIGH:
cfg80211_cqm_rssi_notify(priv->netdev,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
GFP_KERNEL);
0, GFP_KERNEL);
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO,
HostCmd_ACT_GEN_GET, 0, NULL, false);
priv->subsc_evt_rssi_state = RSSI_HIGH_RECVD;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3187,7 +3187,7 @@ static void rndis_do_cqm(struct usbnet *usbdev, s32 rssi)
return;

priv->last_cqm_event_rssi = rssi;
cfg80211_cqm_rssi_notify(usbdev->net, event, GFP_KERNEL);
cfg80211_cqm_rssi_notify(usbdev->net, event, rssi, GFP_KERNEL);
}

#define DEVICE_POLLER_JIFFIES (HZ)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rsi/rsi_91x_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ static void rsi_perform_cqm(struct rsi_common *common,

common->cqm_info.last_cqm_event_rssi = rssi;
rsi_dbg(INFO_ZONE, "CQM: Notifying event: %d\n", event);
ieee80211_cqm_rssi_notify(adapter->vifs[0], event, GFP_KERNEL);
ieee80211_cqm_rssi_notify(adapter->vifs[0], event, rssi, GFP_KERNEL);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/st/cw1200/sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ void cw1200_event_handler(struct work_struct *work)
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW :
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH;
pr_debug("[CQM] RSSI event: %d.\n", rcpi_rssi);
ieee80211_cqm_rssi_notify(priv->vif, cqm_evt,
ieee80211_cqm_rssi_notify(priv->vif, cqm_evt, rcpi_rssi,
GFP_KERNEL);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ti/wl1251/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
"ROAMING_TRIGGER_LOW_RSSI_EVENT");
ieee80211_cqm_rssi_notify(wl->vif,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
GFP_KERNEL);
0, GFP_KERNEL);
}

if (vector & ROAMING_TRIGGER_REGAINED_RSSI_EVENT_ID) {
wl1251_debug(DEBUG_EVENT,
"ROAMING_TRIGGER_REGAINED_RSSI_EVENT");
ieee80211_cqm_rssi_notify(wl->vif,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
GFP_KERNEL);
0, GFP_KERNEL);
}
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/wireless/ti/wlcore/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ void wlcore_event_rssi_trigger(struct wl1271 *wl, s8 *metric_arr)

vif = wl12xx_wlvif_to_vif(wlvif);
if (event != wlvif->last_rssi_event)
ieee80211_cqm_rssi_notify(vif, event, GFP_KERNEL);
ieee80211_cqm_rssi_notify(vif, event, metric,
GFP_KERNEL);
wlvif->last_rssi_event = event;
}
}
Expand Down
49 changes: 26 additions & 23 deletions include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,9 @@ struct ieee80211_mgmt {
} u;
} __packed __aligned(2);

/* Supported Rates value encodings in 802.11n-2009 7.3.2.2 */
/* Supported rates membership selectors */
#define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127
#define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126

/* mgmt header + 1 byte category code */
#define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u)
Expand Down Expand Up @@ -2324,31 +2325,33 @@ enum ieee80211_sa_query_action {
};


#define SUITE(oui, id) (((oui) << 8) | (id))

/* cipher suite selectors */
#define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
#define WLAN_CIPHER_SUITE_WEP40 0x000FAC01
#define WLAN_CIPHER_SUITE_TKIP 0x000FAC02
/* reserved: 0x000FAC03 */
#define WLAN_CIPHER_SUITE_CCMP 0x000FAC04
#define WLAN_CIPHER_SUITE_WEP104 0x000FAC05
#define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06
#define WLAN_CIPHER_SUITE_GCMP 0x000FAC08
#define WLAN_CIPHER_SUITE_GCMP_256 0x000FAC09
#define WLAN_CIPHER_SUITE_CCMP_256 0x000FAC0A
#define WLAN_CIPHER_SUITE_BIP_GMAC_128 0x000FAC0B
#define WLAN_CIPHER_SUITE_BIP_GMAC_256 0x000FAC0C
#define WLAN_CIPHER_SUITE_BIP_CMAC_256 0x000FAC0D

#define WLAN_CIPHER_SUITE_SMS4 0x00147201
#define WLAN_CIPHER_SUITE_USE_GROUP SUITE(0x000FAC, 0)
#define WLAN_CIPHER_SUITE_WEP40 SUITE(0x000FAC, 1)
#define WLAN_CIPHER_SUITE_TKIP SUITE(0x000FAC, 2)
/* reserved: SUITE(0x000FAC, 3) */
#define WLAN_CIPHER_SUITE_CCMP SUITE(0x000FAC, 4)
#define WLAN_CIPHER_SUITE_WEP104 SUITE(0x000FAC, 5)
#define WLAN_CIPHER_SUITE_AES_CMAC SUITE(0x000FAC, 6)
#define WLAN_CIPHER_SUITE_GCMP SUITE(0x000FAC, 8)
#define WLAN_CIPHER_SUITE_GCMP_256 SUITE(0x000FAC, 9)
#define WLAN_CIPHER_SUITE_CCMP_256 SUITE(0x000FAC, 10)
#define WLAN_CIPHER_SUITE_BIP_GMAC_128 SUITE(0x000FAC, 11)
#define WLAN_CIPHER_SUITE_BIP_GMAC_256 SUITE(0x000FAC, 12)
#define WLAN_CIPHER_SUITE_BIP_CMAC_256 SUITE(0x000FAC, 13)

#define WLAN_CIPHER_SUITE_SMS4 SUITE(0x001472, 1)

/* AKM suite selectors */
#define WLAN_AKM_SUITE_8021X 0x000FAC01
#define WLAN_AKM_SUITE_PSK 0x000FAC02
#define WLAN_AKM_SUITE_8021X_SHA256 0x000FAC05
#define WLAN_AKM_SUITE_PSK_SHA256 0x000FAC06
#define WLAN_AKM_SUITE_TDLS 0x000FAC07
#define WLAN_AKM_SUITE_SAE 0x000FAC08
#define WLAN_AKM_SUITE_FT_OVER_SAE 0x000FAC09
#define WLAN_AKM_SUITE_8021X SUITE(0x000FAC, 1)
#define WLAN_AKM_SUITE_PSK SUITE(0x000FAC, 2)
#define WLAN_AKM_SUITE_8021X_SHA256 SUITE(0x000FAC, 5)
#define WLAN_AKM_SUITE_PSK_SHA256 SUITE(0x000FAC, 6)
#define WLAN_AKM_SUITE_TDLS SUITE(0x000FAC, 7)
#define WLAN_AKM_SUITE_SAE SUITE(0x000FAC, 8)
#define WLAN_AKM_SUITE_FT_OVER_SAE SUITE(0x000FAC, 9)

#define WLAN_MAX_KEY_LEN 32

Expand Down
48 changes: 0 additions & 48 deletions include/linux/rfkill-regulator.h

This file was deleted.

92 changes: 70 additions & 22 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright 2015-2016 Intel Deutschland GmbH
* Copyright 2015-2017 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 @@ -748,6 +748,10 @@ struct cfg80211_bitrate_mask {
* @pbss: If set, start as a PCP instead of AP. Relevant for DMG
* networks.
* @beacon_rate: bitrate to be used for beacons
* @ht_cap: HT capabilities (or %NULL if HT isn't enabled)
* @vht_cap: VHT capabilities (or %NULL if VHT isn't enabled)
* @ht_required: stations must support HT
* @vht_required: stations must support VHT
*/
struct cfg80211_ap_settings {
struct cfg80211_chan_def chandef;
Expand All @@ -768,6 +772,10 @@ struct cfg80211_ap_settings {
const struct cfg80211_acl_data *acl;
bool pbss;
struct cfg80211_bitrate_mask beacon_rate;

const struct ieee80211_ht_cap *ht_cap;
const struct ieee80211_vht_cap *vht_cap;
bool ht_required, vht_required;
};

/**
Expand Down Expand Up @@ -2408,23 +2416,25 @@ struct cfg80211_qos_map {
* This struct defines NAN configuration parameters
*
* @master_pref: master preference (1 - 255)
* @dual: dual band operation mode, see &enum nl80211_nan_dual_band_conf
* @bands: operating bands, a bitmap of &enum nl80211_band values.
* For instance, for NL80211_BAND_2GHZ, bit 0 would be set
* (i.e. BIT(NL80211_BAND_2GHZ)).
*/
struct cfg80211_nan_conf {
u8 master_pref;
u8 dual;
u8 bands;
};

/**
* enum cfg80211_nan_conf_changes - indicates changed fields in NAN
* configuration
*
* @CFG80211_NAN_CONF_CHANGED_PREF: master preference
* @CFG80211_NAN_CONF_CHANGED_DUAL: dual band operation
* @CFG80211_NAN_CONF_CHANGED_BANDS: operating bands
*/
enum cfg80211_nan_conf_changes {
CFG80211_NAN_CONF_CHANGED_PREF = BIT(0),
CFG80211_NAN_CONF_CHANGED_DUAL = BIT(1),
CFG80211_NAN_CONF_CHANGED_BANDS = BIT(1),
};

/**
Expand Down Expand Up @@ -3178,22 +3188,6 @@ struct ieee80211_iface_limit {

/**
* struct ieee80211_iface_combination - possible interface combination
* @limits: limits for the given interface types
* @n_limits: number of limitations
* @num_different_channels: can use up to this many different channels
* @max_interfaces: maximum number of interfaces in total allowed in this
* group
* @beacon_int_infra_match: In this combination, the beacon intervals
* between infrastructure and AP types must match. This is required
* only in special cases.
* @radar_detect_widths: bitmap of channel widths supported for radar detection
* @radar_detect_regions: bitmap of regions supported for radar detection
* @beacon_int_min_gcd: This interface combination supports different
* beacon intervals.
* = 0 - all beacon intervals for different interface must be same.
* > 0 - any beacon interval for the interface part of this combination AND
* *GCD* of all beacon intervals from beaconing interfaces of this
* combination must be greater or equal to this value.
*
* With this structure the driver can describe which interface
* combinations it supports concurrently.
Expand Down Expand Up @@ -3252,13 +3246,60 @@ struct ieee80211_iface_limit {
*
*/
struct ieee80211_iface_combination {
/**
* @limits:
* limits for the given interface types
*/
const struct ieee80211_iface_limit *limits;

/**
* @num_different_channels:
* can use up to this many different channels
*/
u32 num_different_channels;

/**
* @max_interfaces:
* maximum number of interfaces in total allowed in this group
*/
u16 max_interfaces;

/**
* @n_limits:
* number of limitations
*/
u8 n_limits;

/**
* @beacon_int_infra_match:
* In this combination, the beacon intervals between infrastructure
* and AP types must match. This is required only in special cases.
*/
bool beacon_int_infra_match;

/**
* @radar_detect_widths:
* bitmap of channel widths supported for radar detection
*/
u8 radar_detect_widths;

/**
* @radar_detect_regions:
* bitmap of regions supported for radar detection
*/
u8 radar_detect_regions;

/**
* @beacon_int_min_gcd:
* This interface combination supports different beacon intervals.
*
* = 0
* all beacon intervals for different interface must be same.
* > 0
* any beacon interval for the interface part of this combination AND
* GCD of all beacon intervals from beaconing interfaces of this
* combination must be greater or equal to this value.
*/
u32 beacon_int_min_gcd;
};

Expand Down Expand Up @@ -3557,6 +3598,10 @@ struct wiphy_iftype_ext_capab {
* attribute indices defined in &enum nl80211_bss_select_attr.
*
* @cookie_counter: unique generic cookie counter, used to identify objects.
* @nan_supported_bands: bands supported by the device in NAN mode, a
* bitmap of &enum nl80211_band values. For instance, for
* NL80211_BAND_2GHZ, bit 0 would be set
* (i.e. BIT(NL80211_BAND_2GHZ)).
*/
struct wiphy {
/* assign these fields before you register the wiphy */
Expand Down Expand Up @@ -3688,6 +3733,8 @@ struct wiphy {

u64 cookie_counter;

u8 nan_supported_bands;

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

Expand Down Expand Up @@ -5351,14 +5398,15 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
* cfg80211_cqm_rssi_notify - connection quality monitoring rssi event
* @dev: network device
* @rssi_event: the triggered RSSI event
* @rssi_level: new RSSI level value or 0 if not available
* @gfp: context flags
*
* This function is called when a configured connection quality monitoring
* rssi threshold reached event occurs.
*/
void cfg80211_cqm_rssi_notify(struct net_device *dev,
enum nl80211_cqm_rssi_threshold_event rssi_event,
gfp_t gfp);
s32 rssi_level, gfp_t gfp);

/**
* cfg80211_cqm_pktloss_notify - notify userspace about packetloss to peer
Expand Down
Loading

0 comments on commit 0d2164a

Please sign in to comment.