···752 struct ath_hw *ah = common->ah;753 struct ath9k_keyval hk;754 const u8 *mac = NULL;755- u8 gmac[ETH_ALEN];756 int ret = 0;757 int idx;758···775 memcpy(hk.kv_val, key->key, key->keylen);776777 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {778-779- if (key->ap_addr) {780- /*781- * Group keys on hardware that supports multicast frame782- * key search use a mac that is the sender's address with783- * the high bit set instead of the app-specified address.784- */785- memcpy(gmac, key->ap_addr, ETH_ALEN);786- gmac[0] |= 0x80;787- mac = gmac;788-789- if (key->alg == ALG_TKIP)790- idx = ath_reserve_key_cache_slot_tkip(common);791- else792- idx = ath_reserve_key_cache_slot(common);793- if (idx < 0)794- mac = NULL; /* no free key cache entries */795- }796-797- if (!mac) {798- /* For now, use the default keys for broadcast keys. This may799- * need to change with virtual interfaces. */800- idx = key->keyidx;801- }802 } else if (key->keyidx) {803 if (WARN_ON(!sta))804 return -EOPNOTSUPP;
···752 struct ath_hw *ah = common->ah;753 struct ath9k_keyval hk;754 const u8 *mac = NULL;0755 int ret = 0;756 int idx;757···776 memcpy(hk.kv_val, key->key, key->keylen);777778 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {779+ /* For now, use the default keys for broadcast keys. This may780+ * need to change with virtual interfaces. */781+ idx = key->keyidx;000000000000000000000782 } else if (key->keyidx) {783 if (WARN_ON(!sta))784 return -EOPNOTSUPP;
···376377 mutex_lock(&priv->mutex);37800000379 if (!iwl_is_ready_rf(priv)) {380 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");381 goto unlock;···502{503 struct iwl_priv *priv =504 container_of(work, struct iwl_priv, scan_completed);0505506 IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");507508 cancel_delayed_work(&priv->scan_check);509510- if (!priv->is_internal_short_scan)511- ieee80211_scan_completed(priv->hw, false);512- else {513 priv->is_internal_short_scan = false;514 IWL_DEBUG_SCAN(priv, "internal short scan completed\n");0515 }000000000516517 if (test_bit(STATUS_EXIT_PENDING, &priv->status))518 return;
···376377 mutex_lock(&priv->mutex);378379+ if (priv->is_internal_short_scan == true) {380+ IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n");381+ goto unlock;382+ }383+384 if (!iwl_is_ready_rf(priv)) {385 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");386 goto unlock;···497{498 struct iwl_priv *priv =499 container_of(work, struct iwl_priv, scan_completed);500+ bool internal = false;501502 IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");503504 cancel_delayed_work(&priv->scan_check);505506+ mutex_lock(&priv->mutex);507+ if (priv->is_internal_short_scan) {0508 priv->is_internal_short_scan = false;509 IWL_DEBUG_SCAN(priv, "internal short scan completed\n");510+ internal = true;511 }512+ mutex_unlock(&priv->mutex);513+514+ /*515+ * Do not hold mutex here since this will cause mac80211 to call516+ * into driver again into functions that will attempt to take517+ * mutex.518+ */519+ if (!internal)520+ ieee80211_scan_completed(priv->hw, false);521522 if (test_bit(STATUS_EXIT_PENDING, &priv->status))523 return;
+1-1
drivers/net/wireless/iwlwifi/iwl-sta.c
···431 struct iwl_link_quality_cmd *link_cmd;432 unsigned long flags;433434- if (*sta_id_r)435 *sta_id_r = IWL_INVALID_STATION;436437 ret = iwl_add_station_common(priv, addr, 0, NULL, &sta_id);
···431 struct iwl_link_quality_cmd *link_cmd;432 unsigned long flags;433434+ if (sta_id_r)435 *sta_id_r = IWL_INVALID_STATION;436437 ret = iwl_add_station_common(priv, addr, 0, NULL, &sta_id);
···815 * encrypted in hardware.816 * @alg: The key algorithm.817 * @flags: key flags, see &enum ieee80211_key_flags.0818 * @keyidx: the key index (0-3)819 * @keylen: key material length820 * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte)···832 u8 iv_len;833 u8 hw_key_idx;834 u8 flags;835- u8 *ap_addr;836 s8 keyidx;837 u8 keylen;838 u8 key[0];···1637 * that TX/RX_STOP can pass NULL for this parameter.1638 * Returns a negative error code on failure.1639 * The callback must be atomic.001640 *1641 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also1642 * need to set wiphy->rfkill_poll to %true before registration,
···815 * encrypted in hardware.816 * @alg: The key algorithm.817 * @flags: key flags, see &enum ieee80211_key_flags.818+ * @ap_addr: AP's MAC address819 * @keyidx: the key index (0-3)820 * @keylen: key material length821 * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte)···831 u8 iv_len;832 u8 hw_key_idx;833 u8 flags;0834 s8 keyidx;835 u8 keylen;836 u8 key[0];···1637 * that TX/RX_STOP can pass NULL for this parameter.1638 * Returns a negative error code on failure.1639 * The callback must be atomic.1640+ *1641+ * @get_survey: Return per-channel survey information1642 *1643 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also1644 * need to set wiphy->rfkill_poll to %true before registration,
-1
net/mac80211/key.c
···140 struct ieee80211_sub_if_data,141 u.ap);142143- key->conf.ap_addr = sdata->dev->dev_addr;144 ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);145146 if (!ret) {
···140 struct ieee80211_sub_if_data,141 u.ap);1420143 ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);144145 if (!ret) {
+1-1
net/mac80211/sta_info.h
···145/**146 * struct sta_ampdu_mlme - STA aggregation information.147 *148- * @tid_state_rx: TID's state in Rx session state machine.149 * @tid_rx: aggregation info for Rx per TID150 * @tid_state_tx: TID's state in Tx session state machine.151 * @tid_tx: aggregation info for Tx per TID
···145/**146 * struct sta_ampdu_mlme - STA aggregation information.147 *148+ * @tid_active_rx: TID's state in Rx session state machine.149 * @tid_rx: aggregation info for Rx per TID150 * @tid_state_tx: TID's state in Tx session state machine.151 * @tid_tx: aggregation info for Tx per TID
+1-1
net/wireless/chan.c
···50 struct ieee80211_channel *chan;51 int result;5253- if (wdev->iftype == NL80211_IFTYPE_MONITOR)54 wdev = NULL;5556 if (wdev) {
···50 struct ieee80211_channel *chan;51 int result;5253+ if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)54 wdev = NULL;5556 if (wdev) {