You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'mac80211-next-for-john-2014-09-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg <johannes@sipsolutions.net> says: "This time, I have some rate minstrel improvements, support for a very small feature from CCX that Steinar reverse-engineered, dynamic ACK timeout support, a number of changes for TDLS, early support for radio resource measurement and many fixes. Also, I'm changing a number of places to clear key memory when it's freed and Intel claims copyright for code they developed." Conflicts: net/mac80211/iface.c Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -4838,7 +4838,6 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
IEEE80211_HW_MFP_CAPABLE |
|
||||
IEEE80211_HW_REPORTS_TX_ACK_STATUS |
|
||||
IEEE80211_HW_HAS_RATE_CONTROL |
|
||||
IEEE80211_HW_SUPPORTS_STATIC_SMPS |
|
||||
IEEE80211_HW_AP_LINK_PS |
|
||||
IEEE80211_HW_SPECTRUM_MGMT;
|
||||
|
||||
@@ -4846,8 +4845,10 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
* bytes is used for padding/alignment if necessary. */
|
||||
ar->hw->extra_tx_headroom += sizeof(struct htt_data_tx_desc_frag)*2 + 4;
|
||||
|
||||
ar->hw->wiphy->features |= NL80211_FEATURE_STATIC_SMPS;
|
||||
|
||||
if (ar->ht_cap_info & WMI_HT_CAP_DYNAMIC_SMPS)
|
||||
ar->hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS;
|
||||
ar->hw->wiphy->features |= NL80211_FEATURE_DYNAMIC_SMPS;
|
||||
|
||||
if (ar->ht_cap_info & WMI_HT_CAP_ENABLED) {
|
||||
ar->hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
|
||||
|
||||
@@ -704,7 +704,7 @@ ath5k_get_survey(struct ieee80211_hw *hw, int idx, struct survey_info *survey)
|
||||
* reset.
|
||||
*/
|
||||
static void
|
||||
ath5k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class)
|
||||
ath5k_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
|
||||
{
|
||||
struct ath5k_hw *ah = hw->priv;
|
||||
|
||||
|
||||
@@ -1722,7 +1722,7 @@ static int ath9k_htc_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
|
||||
}
|
||||
|
||||
static void ath9k_htc_set_coverage_class(struct ieee80211_hw *hw,
|
||||
u8 coverage_class)
|
||||
s16 coverage_class)
|
||||
{
|
||||
struct ath9k_htc_priv *priv = hw->priv;
|
||||
|
||||
|
||||
@@ -1860,7 +1860,8 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ath9k_set_coverage_class(struct ieee80211_hw *hw, u8 coverage_class)
|
||||
static void ath9k_set_coverage_class(struct ieee80211_hw *hw,
|
||||
s16 coverage_class)
|
||||
{
|
||||
struct ath_softc *sc = hw->priv;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
|
||||
@@ -5757,9 +5757,8 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length)
|
||||
IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_SUPPORTS_PS |
|
||||
IEEE80211_HW_SUPPORTS_DYNAMIC_PS;
|
||||
if (il->cfg->sku & IL_SKU_N)
|
||||
hw->flags |=
|
||||
IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
|
||||
IEEE80211_HW_SUPPORTS_STATIC_SMPS;
|
||||
hw->wiphy->features |= NL80211_FEATURE_DYNAMIC_SMPS |
|
||||
NL80211_FEATURE_STATIC_SMPS;
|
||||
|
||||
hw->sta_data_size = sizeof(struct il_station_priv);
|
||||
hw->vif_data_size = sizeof(struct il_vif_priv);
|
||||
|
||||
@@ -125,8 +125,8 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
|
||||
*/
|
||||
|
||||
if (priv->nvm_data->sku_cap_11n_enable)
|
||||
hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
|
||||
IEEE80211_HW_SUPPORTS_STATIC_SMPS;
|
||||
hw->wiphy->features |= NL80211_FEATURE_DYNAMIC_SMPS |
|
||||
NL80211_FEATURE_STATIC_SMPS;
|
||||
|
||||
/*
|
||||
* Enable 11w if advertised by firmware and software crypto
|
||||
|
||||
@@ -303,9 +303,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
IEEE80211_HW_AMPDU_AGGREGATION |
|
||||
IEEE80211_HW_TIMING_BEACON_ONLY |
|
||||
IEEE80211_HW_CONNECTION_MONITOR |
|
||||
IEEE80211_HW_CHANCTX_STA_CSA |
|
||||
IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
|
||||
IEEE80211_HW_SUPPORTS_STATIC_SMPS;
|
||||
IEEE80211_HW_CHANCTX_STA_CSA;
|
||||
|
||||
hw->queues = mvm->first_agg_queue;
|
||||
hw->offchannel_tx_hw_queue = IWL_MVM_OFFCHANNEL_QUEUE;
|
||||
@@ -409,7 +407,9 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||
|
||||
hw->wiphy->features |= NL80211_FEATURE_P2P_GO_CTWIN |
|
||||
NL80211_FEATURE_LOW_PRIORITY_SCAN |
|
||||
NL80211_FEATURE_P2P_GO_OPPPS;
|
||||
NL80211_FEATURE_P2P_GO_OPPPS |
|
||||
NL80211_FEATURE_DYNAMIC_SMPS |
|
||||
NL80211_FEATURE_STATIC_SMPS;
|
||||
|
||||
mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
|
||||
|
||||
|
||||
@@ -2045,8 +2045,6 @@ static int mac80211_hwsim_create_radio(int channels, const char *reg_alpha2,
|
||||
|
||||
hw->flags = IEEE80211_HW_MFP_CAPABLE |
|
||||
IEEE80211_HW_SIGNAL_DBM |
|
||||
IEEE80211_HW_SUPPORTS_STATIC_SMPS |
|
||||
IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
|
||||
IEEE80211_HW_AMPDU_AGGREGATION |
|
||||
IEEE80211_HW_WANT_MONITOR_VIF |
|
||||
IEEE80211_HW_QUEUE_CONTROL |
|
||||
@@ -2059,8 +2057,10 @@ static int mac80211_hwsim_create_radio(int channels, const char *reg_alpha2,
|
||||
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
|
||||
WIPHY_FLAG_AP_UAPSD |
|
||||
WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||
hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR;
|
||||
hw->wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE;
|
||||
hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR |
|
||||
NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
|
||||
NL80211_FEATURE_STATIC_SMPS |
|
||||
NL80211_FEATURE_DYNAMIC_SMPS;
|
||||
|
||||
/* ask mac80211 to reserve space for magic */
|
||||
hw->vif_data_size = sizeof(struct hwsim_vif_priv);
|
||||
|
||||
@@ -696,7 +696,8 @@ static void p54_flush(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
|
||||
WARN(total, "tx flush timeout, unresponsive firmware");
|
||||
}
|
||||
|
||||
static void p54_set_coverage_class(struct ieee80211_hw *dev, u8 coverage_class)
|
||||
static void p54_set_coverage_class(struct ieee80211_hw *dev,
|
||||
s16 coverage_class)
|
||||
{
|
||||
struct p54_common *priv = dev->priv;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright (c) 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
|
||||
* Copyright (c) 2005, Devicescape Software, Inc.
|
||||
* Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net>
|
||||
* Copyright (c) 2013 - 2014 Intel Mobile Communications 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
|
||||
@@ -165,8 +166,12 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
|
||||
|
||||
#define IEEE80211_MAX_MESH_ID_LEN 32
|
||||
|
||||
#define IEEE80211_FIRST_TSPEC_TSID 8
|
||||
#define IEEE80211_NUM_TIDS 16
|
||||
|
||||
/* number of user priorities 802.11 uses */
|
||||
#define IEEE80211_NUM_UPS 8
|
||||
|
||||
#define IEEE80211_QOS_CTL_LEN 2
|
||||
/* 1d tag mask */
|
||||
#define IEEE80211_QOS_CTL_TAG1D_MASK 0x0007
|
||||
@@ -1823,7 +1828,8 @@ enum ieee80211_eid {
|
||||
WLAN_EID_DMG_TSPEC = 146,
|
||||
WLAN_EID_DMG_AT = 147,
|
||||
WLAN_EID_DMG_CAP = 148,
|
||||
/* 149-150 reserved for Cisco */
|
||||
/* 149 reserved for Cisco */
|
||||
WLAN_EID_CISCO_VENDOR_SPECIFIC = 150,
|
||||
WLAN_EID_DMG_OPERATION = 151,
|
||||
WLAN_EID_DMG_BSS_PARAM_CHANGE = 152,
|
||||
WLAN_EID_DMG_BEAM_REFINEMENT = 153,
|
||||
|
||||
+36
-8
@@ -4,6 +4,7 @@
|
||||
* 802.11 device and configuration interface
|
||||
*
|
||||
* Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2013-2014 Intel Mobile Communications 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
|
||||
@@ -663,6 +664,7 @@ struct cfg80211_acl_data {
|
||||
* @crypto: crypto settings
|
||||
* @privacy: the BSS uses privacy
|
||||
* @auth_type: Authentication type (algorithm)
|
||||
* @smps_mode: SMPS mode
|
||||
* @inactivity_timeout: time in seconds to determine station's inactivity.
|
||||
* @p2p_ctwindow: P2P CT Window
|
||||
* @p2p_opp_ps: P2P opportunistic PS
|
||||
@@ -681,6 +683,7 @@ struct cfg80211_ap_settings {
|
||||
struct cfg80211_crypto_settings crypto;
|
||||
bool privacy;
|
||||
enum nl80211_auth_type auth_type;
|
||||
enum nl80211_smps_mode smps_mode;
|
||||
int inactivity_timeout;
|
||||
u8 p2p_ctwindow;
|
||||
bool p2p_opp_ps;
|
||||
@@ -1607,10 +1610,12 @@ struct cfg80211_auth_request {
|
||||
*
|
||||
* @ASSOC_REQ_DISABLE_HT: Disable HT (802.11n)
|
||||
* @ASSOC_REQ_DISABLE_VHT: Disable VHT
|
||||
* @ASSOC_REQ_USE_RRM: Declare RRM capability in this association
|
||||
*/
|
||||
enum cfg80211_assoc_req_flags {
|
||||
ASSOC_REQ_DISABLE_HT = BIT(0),
|
||||
ASSOC_REQ_DISABLE_VHT = BIT(1),
|
||||
ASSOC_REQ_USE_RRM = BIT(2),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1802,6 +1807,7 @@ struct cfg80211_connect_params {
|
||||
* @WIPHY_PARAM_FRAG_THRESHOLD: wiphy->frag_threshold has changed
|
||||
* @WIPHY_PARAM_RTS_THRESHOLD: wiphy->rts_threshold has changed
|
||||
* @WIPHY_PARAM_COVERAGE_CLASS: coverage class changed
|
||||
* @WIPHY_PARAM_DYN_ACK: dynack has been enabled
|
||||
*/
|
||||
enum wiphy_params_flags {
|
||||
WIPHY_PARAM_RETRY_SHORT = 1 << 0,
|
||||
@@ -1809,6 +1815,7 @@ enum wiphy_params_flags {
|
||||
WIPHY_PARAM_FRAG_THRESHOLD = 1 << 2,
|
||||
WIPHY_PARAM_RTS_THRESHOLD = 1 << 3,
|
||||
WIPHY_PARAM_COVERAGE_CLASS = 1 << 4,
|
||||
WIPHY_PARAM_DYN_ACK = 1 << 5,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -1975,14 +1982,12 @@ struct cfg80211_wowlan_wakeup {
|
||||
|
||||
/**
|
||||
* struct cfg80211_gtk_rekey_data - rekey data
|
||||
* @kek: key encryption key
|
||||
* @kck: key confirmation key
|
||||
* @replay_ctr: replay counter
|
||||
* @kek: key encryption key (NL80211_KEK_LEN bytes)
|
||||
* @kck: key confirmation key (NL80211_KCK_LEN bytes)
|
||||
* @replay_ctr: replay counter (NL80211_REPLAY_CTR_LEN bytes)
|
||||
*/
|
||||
struct cfg80211_gtk_rekey_data {
|
||||
u8 kek[NL80211_KEK_LEN];
|
||||
u8 kck[NL80211_KCK_LEN];
|
||||
u8 replay_ctr[NL80211_REPLAY_CTR_LEN];
|
||||
const u8 *kek, *kck, *replay_ctr;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2315,6 +2320,17 @@ struct cfg80211_qos_map {
|
||||
* @set_ap_chanwidth: Set the AP (including P2P GO) mode channel width for the
|
||||
* given interface This is used e.g. for dynamic HT 20/40 MHz channel width
|
||||
* changes during the lifetime of the BSS.
|
||||
*
|
||||
* @add_tx_ts: validate (if admitted_time is 0) or add a TX TS to the device
|
||||
* with the given parameters; action frame exchange has been handled by
|
||||
* userspace so this just has to modify the TX path to take the TS into
|
||||
* account.
|
||||
* If the admitted time is 0 just validate the parameters to make sure
|
||||
* the session can be created at all; it is valid to just always return
|
||||
* success for that but that may result in inefficient behaviour (handshake
|
||||
* with the peer followed by immediate teardown when the addition is later
|
||||
* rejected)
|
||||
* @del_tx_ts: remove an existing TX TS
|
||||
*/
|
||||
struct cfg80211_ops {
|
||||
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
|
||||
@@ -2555,6 +2571,12 @@ struct cfg80211_ops {
|
||||
|
||||
int (*set_ap_chanwidth)(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_chan_def *chandef);
|
||||
|
||||
int (*add_tx_ts)(struct wiphy *wiphy, struct net_device *dev,
|
||||
u8 tsid, const u8 *peer, u8 user_prio,
|
||||
u16 admitted_time);
|
||||
int (*del_tx_ts)(struct wiphy *wiphy, struct net_device *dev,
|
||||
u8 tsid, const u8 *peer);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2601,9 +2623,13 @@ struct cfg80211_ops {
|
||||
* @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels.
|
||||
* @WIPHY_FLAG_HAS_CHANNEL_SWITCH: Device supports channel switch in
|
||||
* beaconing mode (AP, IBSS, Mesh, ...).
|
||||
* @WIPHY_FLAG_SUPPORTS_WMM_ADMISSION: the device supports setting up WMM
|
||||
* TSPEC sessions (TID aka TSID 0-7) with the NL80211_CMD_ADD_TX_TS
|
||||
* command. Standard IEEE 802.11 TSPEC setup is not yet supported, it
|
||||
* needs to be able to handle Block-Ack agreements and other things.
|
||||
*/
|
||||
enum wiphy_flags {
|
||||
/* use hole at 0 */
|
||||
WIPHY_FLAG_SUPPORTS_WMM_ADMISSION = BIT(0),
|
||||
/* use hole at 1 */
|
||||
/* use hole at 2 */
|
||||
WIPHY_FLAG_NETNS_OK = BIT(3),
|
||||
@@ -3920,6 +3946,7 @@ void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr);
|
||||
* moves to cfg80211 in this call
|
||||
* @buf: authentication frame (header + body)
|
||||
* @len: length of the frame data
|
||||
* @uapsd_queues: bitmap of ACs configured to uapsd. -1 if n/a.
|
||||
*
|
||||
* After being asked to associate via cfg80211_ops::assoc() the driver must
|
||||
* call either this function or cfg80211_auth_timeout().
|
||||
@@ -3928,7 +3955,8 @@ void cfg80211_auth_timeout(struct net_device *dev, const u8 *addr);
|
||||
*/
|
||||
void cfg80211_rx_assoc_resp(struct net_device *dev,
|
||||
struct cfg80211_bss *bss,
|
||||
const u8 *buf, size_t len);
|
||||
const u8 *buf, size_t len,
|
||||
int uapsd_queues);
|
||||
|
||||
/**
|
||||
* cfg80211_assoc_timeout - notification of timed out association
|
||||
|
||||
+6
-14
@@ -4,6 +4,7 @@
|
||||
* Copyright 2002-2005, Devicescape Software, Inc.
|
||||
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
|
||||
* Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2013-2014 Intel Mobile Communications 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
|
||||
@@ -1536,16 +1537,6 @@ struct ieee80211_tx_control {
|
||||
* @IEEE80211_HW_MFP_CAPABLE:
|
||||
* Hardware supports management frame protection (MFP, IEEE 802.11w).
|
||||
*
|
||||
* @IEEE80211_HW_SUPPORTS_STATIC_SMPS:
|
||||
* Hardware supports static spatial multiplexing powersave,
|
||||
* ie. can turn off all but one chain even on HT connections
|
||||
* that should be using more chains.
|
||||
*
|
||||
* @IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS:
|
||||
* Hardware supports dynamic spatial multiplexing powersave,
|
||||
* ie. can turn off all but one chain and then wake the rest
|
||||
* up as required after, for example, rts/cts handshake.
|
||||
*
|
||||
* @IEEE80211_HW_SUPPORTS_UAPSD:
|
||||
* Hardware supports Unscheduled Automatic Power Save Delivery
|
||||
* (U-APSD) in managed mode. The mode is configured with
|
||||
@@ -1631,8 +1622,7 @@ enum ieee80211_hw_flags {
|
||||
IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
|
||||
IEEE80211_HW_MFP_CAPABLE = 1<<13,
|
||||
IEEE80211_HW_WANT_MONITOR_VIF = 1<<14,
|
||||
IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15,
|
||||
IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16,
|
||||
/* free slots */
|
||||
IEEE80211_HW_SUPPORTS_UAPSD = 1<<17,
|
||||
IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18,
|
||||
IEEE80211_HW_CONNECTION_MONITOR = 1<<19,
|
||||
@@ -2672,7 +2662,9 @@ enum ieee80211_roc_type {
|
||||
*
|
||||
* @set_coverage_class: Set slot time for given coverage class as specified
|
||||
* in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout
|
||||
* accordingly. This callback is not required and may sleep.
|
||||
* accordingly; coverage class equals to -1 to enable ACK timeout
|
||||
* estimation algorithm (dynack). To disable dynack set valid value for
|
||||
* coverage class. This callback is not required and may sleep.
|
||||
*
|
||||
* @testmode_cmd: Implement a cfg80211 test mode command. The passed @vif may
|
||||
* be %NULL. The callback can sleep.
|
||||
@@ -2956,7 +2948,7 @@ struct ieee80211_ops {
|
||||
int (*get_survey)(struct ieee80211_hw *hw, int idx,
|
||||
struct survey_info *survey);
|
||||
void (*rfkill_poll)(struct ieee80211_hw *hw);
|
||||
void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class);
|
||||
void (*set_coverage_class)(struct ieee80211_hw *hw, s16 coverage_class);
|
||||
#ifdef CONFIG_NL80211_TESTMODE
|
||||
int (*testmode_cmd)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
void *data, int len);
|
||||
|
||||
@@ -722,6 +722,22 @@
|
||||
* QoS mapping is relevant for IP packets, it is only valid during an
|
||||
* association. This is cleared on disassociation and AP restart.
|
||||
*
|
||||
* @NL80211_CMD_ADD_TX_TS: Ask the kernel to add a traffic stream for the given
|
||||
* %NL80211_ATTR_TSID and %NL80211_ATTR_MAC with %NL80211_ATTR_USER_PRIO
|
||||
* and %NL80211_ATTR_ADMITTED_TIME parameters.
|
||||
* Note that the action frame handshake with the AP shall be handled by
|
||||
* userspace via the normal management RX/TX framework, this only sets
|
||||
* up the TX TS in the driver/device.
|
||||
* If the admitted time attribute is not added then the request just checks
|
||||
* if a subsequent setup could be successful, the intent is to use this to
|
||||
* avoid setting up a session with the AP when local restrictions would
|
||||
* make that impossible. However, the subsequent "real" setup may still
|
||||
* fail even if the check was successful.
|
||||
* @NL80211_CMD_DEL_TX_TS: Remove an existing TS with the %NL80211_ATTR_TSID
|
||||
* and %NL80211_ATTR_MAC parameters. It isn't necessary to call this
|
||||
* before removing a station entry entirely, or before disassociating
|
||||
* or similar, cleanup will happen in the driver/device in this case.
|
||||
*
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -893,6 +909,9 @@ enum nl80211_commands {
|
||||
|
||||
NL80211_CMD_SET_QOS_MAP,
|
||||
|
||||
NL80211_CMD_ADD_TX_TS,
|
||||
NL80211_CMD_DEL_TX_TS,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
@@ -1594,6 +1613,31 @@ enum nl80211_commands {
|
||||
* @NL80211_ATTR_TDLS_INITIATOR: flag attribute indicating the current end is
|
||||
* the TDLS link initiator.
|
||||
*
|
||||
* @NL80211_ATTR_USE_RRM: flag for indicating whether the current connection
|
||||
* shall support Radio Resource Measurements (11k). This attribute can be
|
||||
* used with %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests.
|
||||
* User space applications are expected to use this flag only if the
|
||||
* underlying device supports these minimal RRM features:
|
||||
* %NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES,
|
||||
* %NL80211_FEATURE_QUIET,
|
||||
* If this flag is used, driver must add the Power Capabilities IE to the
|
||||
* association request. In addition, it must also set the RRM capability
|
||||
* flag in the association request's Capability Info field.
|
||||
*
|
||||
* @NL80211_ATTR_WIPHY_DYN_ACK: flag attribute used to enable ACK timeout
|
||||
* estimation algorithm (dynack). In order to activate dynack
|
||||
* %NL80211_FEATURE_ACKTO_ESTIMATION feature flag must be set by lower
|
||||
* drivers to indicate dynack capability. Dynack is automatically disabled
|
||||
* setting valid value for coverage class.
|
||||
*
|
||||
* @NL80211_ATTR_TSID: a TSID value (u8 attribute)
|
||||
* @NL80211_ATTR_USER_PRIO: user priority value (u8 attribute)
|
||||
* @NL80211_ATTR_ADMITTED_TIME: admitted time in units of 32 microseconds
|
||||
* (per second) (u16 attribute)
|
||||
*
|
||||
* @NL80211_ATTR_SMPS_MODE: SMPS mode to use (ap mode). see
|
||||
* &enum nl80211_smps_mode.
|
||||
*
|
||||
* @NL80211_ATTR_MAX: highest attribute number currently defined
|
||||
* @__NL80211_ATTR_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -1936,6 +1980,16 @@ enum nl80211_attrs {
|
||||
|
||||
NL80211_ATTR_TDLS_INITIATOR,
|
||||
|
||||
NL80211_ATTR_USE_RRM,
|
||||
|
||||
NL80211_ATTR_WIPHY_DYN_ACK,
|
||||
|
||||
NL80211_ATTR_TSID,
|
||||
NL80211_ATTR_USER_PRIO,
|
||||
NL80211_ATTR_ADMITTED_TIME,
|
||||
|
||||
NL80211_ATTR_SMPS_MODE,
|
||||
|
||||
/* add attributes here, update the policy in nl80211.c */
|
||||
|
||||
__NL80211_ATTR_AFTER_LAST,
|
||||
@@ -3968,6 +4022,26 @@ enum nl80211_ap_sme_features {
|
||||
* @NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE: This driver supports dynamic
|
||||
* channel bandwidth change (e.g., HT 20 <-> 40 MHz channel) during the
|
||||
* lifetime of a BSS.
|
||||
* @NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES: This device adds a DS Parameter
|
||||
* Set IE to probe requests.
|
||||
* @NL80211_FEATURE_WFA_TPC_IE_IN_PROBES: This device adds a WFA TPC Report IE
|
||||
* to probe requests.
|
||||
* @NL80211_FEATURE_QUIET: This device, in client mode, supports Quiet Period
|
||||
* requests sent to it by an AP.
|
||||
* @NL80211_FEATURE_TX_POWER_INSERTION: This device is capable of inserting the
|
||||
* current tx power value into the TPC Report IE in the spectrum
|
||||
* management TPC Report action frame, and in the Radio Measurement Link
|
||||
* Measurement Report action frame.
|
||||
* @NL80211_FEATURE_ACKTO_ESTIMATION: This driver supports dynamic ACK timeout
|
||||
* estimation (dynack). %NL80211_ATTR_WIPHY_DYN_ACK flag attribute is used
|
||||
* to enable dynack.
|
||||
* @NL80211_FEATURE_STATIC_SMPS: Device supports static spatial
|
||||
* multiplexing powersave, ie. can turn off all but one chain
|
||||
* even on HT connections that should be using more chains.
|
||||
* @NL80211_FEATURE_DYNAMIC_SMPS: Device supports dynamic spatial
|
||||
* multiplexing powersave, ie. can turn off all but one chain
|
||||
* and then wake the rest up as required after, for example,
|
||||
* rts/cts handshake.
|
||||
*/
|
||||
enum nl80211_feature_flags {
|
||||
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
|
||||
@@ -3989,6 +4063,13 @@ enum nl80211_feature_flags {
|
||||
NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
|
||||
NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17,
|
||||
NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE = 1 << 18,
|
||||
NL80211_FEATURE_DS_PARAM_SET_IE_IN_PROBES = 1 << 19,
|
||||
NL80211_FEATURE_WFA_TPC_IE_IN_PROBES = 1 << 20,
|
||||
NL80211_FEATURE_QUIET = 1 << 21,
|
||||
NL80211_FEATURE_TX_POWER_INSERTION = 1 << 22,
|
||||
NL80211_FEATURE_ACKTO_ESTIMATION = 1 << 23,
|
||||
NL80211_FEATURE_STATIC_SMPS = 1 << 24,
|
||||
NL80211_FEATURE_DYNAMIC_SMPS = 1 << 25,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -4062,6 +4143,25 @@ enum nl80211_acl_policy {
|
||||
NL80211_ACL_POLICY_DENY_UNLESS_LISTED,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_smps_mode - SMPS mode
|
||||
*
|
||||
* Requested SMPS mode (for AP mode)
|
||||
*
|
||||
* @NL80211_SMPS_OFF: SMPS off (use all antennas).
|
||||
* @NL80211_SMPS_STATIC: static SMPS (use a single antenna)
|
||||
* @NL80211_SMPS_DYNAMIC: dynamic smps (start with a single antenna and
|
||||
* turn on other antennas after CTS/RTS).
|
||||
*/
|
||||
enum nl80211_smps_mode {
|
||||
NL80211_SMPS_OFF,
|
||||
NL80211_SMPS_STATIC,
|
||||
NL80211_SMPS_DYNAMIC,
|
||||
|
||||
__NL80211_SMPS_AFTER_LAST,
|
||||
NL80211_SMPS_MAX = __NL80211_SMPS_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/**
|
||||
* enum nl80211_radar_event - type of radar event for DFS operation
|
||||
*
|
||||
|
||||
@@ -227,7 +227,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
|
||||
void __ieee80211_start_rx_ba_session(struct sta_info *sta,
|
||||
u8 dialog_token, u16 timeout,
|
||||
u16 start_seq_num, u16 ba_policy, u16 tid,
|
||||
u16 buf_size, bool tx)
|
||||
u16 buf_size, bool tx, bool auto_seq)
|
||||
{
|
||||
struct ieee80211_local *local = sta->sdata->local;
|
||||
struct tid_ampdu_rx *tid_agg_rx;
|
||||
@@ -326,6 +326,7 @@ void __ieee80211_start_rx_ba_session(struct sta_info *sta,
|
||||
tid_agg_rx->buf_size = buf_size;
|
||||
tid_agg_rx->timeout = timeout;
|
||||
tid_agg_rx->stored_mpdu_num = 0;
|
||||
tid_agg_rx->auto_seq = auto_seq;
|
||||
status = WLAN_STATUS_SUCCESS;
|
||||
|
||||
/* activate it for RX */
|
||||
@@ -367,7 +368,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
|
||||
|
||||
__ieee80211_start_rx_ba_session(sta, dialog_token, timeout,
|
||||
start_seq_num, ba_policy, tid,
|
||||
buf_size, true);
|
||||
buf_size, true, false);
|
||||
}
|
||||
|
||||
void ieee80211_start_rx_ba_session_offl(struct ieee80211_vif *vif,
|
||||
|
||||
+74
-27
@@ -2,6 +2,7 @@
|
||||
* mac80211 configuration hooks for cfg80211
|
||||
*
|
||||
* Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2013-2014 Intel Mobile Communications GmbH
|
||||
*
|
||||
* This file is GPLv2 as found in COPYING.
|
||||
*/
|
||||
@@ -682,8 +683,19 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
if (old)
|
||||
return -EALREADY;
|
||||
|
||||
/* TODO: make hostapd tell us what it wants */
|
||||
sdata->smps_mode = IEEE80211_SMPS_OFF;
|
||||
switch (params->smps_mode) {
|
||||
case NL80211_SMPS_OFF:
|
||||
sdata->smps_mode = IEEE80211_SMPS_OFF;
|
||||
break;
|
||||
case NL80211_SMPS_STATIC:
|
||||
sdata->smps_mode = IEEE80211_SMPS_STATIC;
|
||||
break;
|
||||
case NL80211_SMPS_DYNAMIC:
|
||||
sdata->smps_mode = IEEE80211_SMPS_DYNAMIC;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
sdata->needed_rx_chains = sdata->local->rx_chains;
|
||||
|
||||
mutex_lock(&local->mtx);
|
||||
@@ -1977,8 +1989,13 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (changed & WIPHY_PARAM_COVERAGE_CLASS) {
|
||||
err = drv_set_coverage_class(local, wiphy->coverage_class);
|
||||
if ((changed & WIPHY_PARAM_COVERAGE_CLASS) ||
|
||||
(changed & WIPHY_PARAM_DYN_ACK)) {
|
||||
s16 coverage_class;
|
||||
|
||||
coverage_class = changed & WIPHY_PARAM_COVERAGE_CLASS ?
|
||||
wiphy->coverage_class : -1;
|
||||
err = drv_set_coverage_class(local, coverage_class);
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
@@ -2351,6 +2368,58 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool ieee80211_coalesce_started_roc(struct ieee80211_local *local,
|
||||
struct ieee80211_roc_work *new_roc,
|
||||
struct ieee80211_roc_work *cur_roc)
|
||||
{
|
||||
unsigned long j = jiffies;
|
||||
unsigned long cur_roc_end = cur_roc->hw_start_time +
|
||||
msecs_to_jiffies(cur_roc->duration);
|
||||
struct ieee80211_roc_work *next_roc;
|
||||
int new_dur;
|
||||
|
||||
if (WARN_ON(!cur_roc->started || !cur_roc->hw_begun))
|
||||
return false;
|
||||
|
||||
if (time_after(j + IEEE80211_ROC_MIN_LEFT, cur_roc_end))
|
||||
return false;
|
||||
|
||||
ieee80211_handle_roc_started(new_roc);
|
||||
|
||||
new_dur = new_roc->duration - jiffies_to_msecs(cur_roc_end - j);
|
||||
|
||||
/* cur_roc is long enough - add new_roc to the dependents list. */
|
||||
if (new_dur <= 0) {
|
||||
list_add_tail(&new_roc->list, &cur_roc->dependents);
|
||||
return true;
|
||||
}
|
||||
|
||||
new_roc->duration = new_dur;
|
||||
|
||||
/*
|
||||
* if cur_roc was already coalesced before, we might
|
||||
* want to extend the next roc instead of adding
|
||||
* a new one.
|
||||
*/
|
||||
next_roc = list_entry(cur_roc->list.next,
|
||||
struct ieee80211_roc_work, list);
|
||||
if (&next_roc->list != &local->roc_list &&
|
||||
next_roc->chan == new_roc->chan &&
|
||||
next_roc->sdata == new_roc->sdata &&
|
||||
!WARN_ON(next_roc->started)) {
|
||||
list_add_tail(&new_roc->list, &next_roc->dependents);
|
||||
next_roc->duration = max(next_roc->duration,
|
||||
new_roc->duration);
|
||||
next_roc->type = max(next_roc->type, new_roc->type);
|
||||
return true;
|
||||
}
|
||||
|
||||
/* add right after cur_roc */
|
||||
list_add(&new_roc->list, &cur_roc->list);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static int ieee80211_start_roc_work(struct ieee80211_local *local,
|
||||
struct ieee80211_sub_if_data *sdata,
|
||||
struct ieee80211_channel *channel,
|
||||
@@ -2456,8 +2525,6 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,
|
||||
|
||||
/* If it has already started, it's more difficult ... */
|
||||
if (local->ops->remain_on_channel) {
|
||||
unsigned long j = jiffies;
|
||||
|
||||
/*
|
||||
* In the offloaded ROC case, if it hasn't begun, add
|
||||
* this new one to the dependent list to be handled
|
||||
@@ -2480,28 +2547,8 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,
|
||||
break;
|
||||
}
|
||||
|
||||
if (time_before(j + IEEE80211_ROC_MIN_LEFT,
|
||||
tmp->hw_start_time +
|
||||
msecs_to_jiffies(tmp->duration))) {
|
||||
int new_dur;
|
||||
|
||||
ieee80211_handle_roc_started(roc);
|
||||
|
||||
new_dur = roc->duration -
|
||||
jiffies_to_msecs(tmp->hw_start_time +
|
||||
msecs_to_jiffies(
|
||||
tmp->duration) -
|
||||
j);
|
||||
|
||||
if (new_dur > 0) {
|
||||
/* add right after tmp */
|
||||
list_add(&roc->list, &tmp->list);
|
||||
} else {
|
||||
list_add_tail(&roc->list,
|
||||
&tmp->dependents);
|
||||
}
|
||||
if (ieee80211_coalesce_started_roc(local, roc, tmp))
|
||||
queued = true;
|
||||
}
|
||||
} else if (del_timer_sync(&tmp->work.timer)) {
|
||||
unsigned long new_end;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* mac80211 debugfs for wireless PHYs
|
||||
*
|
||||
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2013-2014 Intel Mobile Communications GmbH
|
||||
*
|
||||
* GPLv2
|
||||
*
|
||||
@@ -302,11 +303,6 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
|
||||
sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_DYNAMIC_PS\n");
|
||||
if (local->hw.flags & IEEE80211_HW_MFP_CAPABLE)
|
||||
sf += scnprintf(buf + sf, mxln - sf, "MFP_CAPABLE\n");
|
||||
if (local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS)
|
||||
sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_STATIC_SMPS\n");
|
||||
if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS)
|
||||
sf += scnprintf(buf + sf, mxln - sf,
|
||||
"SUPPORTS_DYNAMIC_SMPS\n");
|
||||
if (local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)
|
||||
sf += scnprintf(buf + sf, mxln - sf, "SUPPORTS_UAPSD\n");
|
||||
if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
|
||||
|
||||
@@ -226,12 +226,12 @@ static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata,
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
int err;
|
||||
|
||||
if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS) &&
|
||||
if (!(local->hw.wiphy->features & NL80211_FEATURE_STATIC_SMPS) &&
|
||||
smps_mode == IEEE80211_SMPS_STATIC)
|
||||
return -EINVAL;
|
||||
|
||||
/* auto should be dynamic if in PS mode */
|
||||
if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS) &&
|
||||
if (!(local->hw.wiphy->features & NL80211_FEATURE_DYNAMIC_SMPS) &&
|
||||
(smps_mode == IEEE80211_SMPS_DYNAMIC ||
|
||||
smps_mode == IEEE80211_SMPS_AUTOMATIC))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* Copyright 2003-2005 Devicescape Software, Inc.
|
||||
* Copyright (c) 2006 Jiri Benc <jbenc@suse.cz>
|
||||
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2013-2014 Intel Mobile Communications 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
|
||||
|
||||
@@ -450,7 +450,7 @@ static inline int drv_set_rts_threshold(struct ieee80211_local *local,
|
||||
}
|
||||
|
||||
static inline int drv_set_coverage_class(struct ieee80211_local *local,
|
||||
u8 value)
|
||||
s16 value)
|
||||
{
|
||||
int ret = 0;
|
||||
might_sleep();
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
|
||||
* Copyright 2007, Michael Wu <flamingice@sourmilk.net>
|
||||
* Copyright 2009, Johannes Berg <johannes@sipsolutions.net>
|
||||
* Copyright 2013-2014 Intel Mobile Communications 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user