···752752 struct ath_hw *ah = common->ah;753753 struct ath9k_keyval hk;754754 const u8 *mac = NULL;755755- u8 gmac[ETH_ALEN];756755 int ret = 0;757756 int idx;758757···775776 memcpy(hk.kv_val, key->key, key->keylen);776777777778 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {778778-779779- if (key->ap_addr) {780780- /*781781- * Group keys on hardware that supports multicast frame782782- * key search use a mac that is the sender's address with783783- * the high bit set instead of the app-specified address.784784- */785785- memcpy(gmac, key->ap_addr, ETH_ALEN);786786- gmac[0] |= 0x80;787787- mac = gmac;788788-789789- if (key->alg == ALG_TKIP)790790- idx = ath_reserve_key_cache_slot_tkip(common);791791- else792792- idx = ath_reserve_key_cache_slot(common);793793- if (idx < 0)794794- mac = NULL; /* no free key cache entries */795795- }796796-797797- if (!mac) {798798- /* For now, use the default keys for broadcast keys. This may799799- * need to change with virtual interfaces. */800800- idx = key->keyidx;801801- }779779+ /* For now, use the default keys for broadcast keys. This may780780+ * need to change with virtual interfaces. */781781+ idx = key->keyidx;802782 } else if (key->keyidx) {803783 if (WARN_ON(!sta))804784 return -EOPNOTSUPP;
···376376377377 mutex_lock(&priv->mutex);378378379379+ if (priv->is_internal_short_scan == true) {380380+ IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n");381381+ goto unlock;382382+ }383383+379384 if (!iwl_is_ready_rf(priv)) {380385 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n");381386 goto unlock;···502497{503498 struct iwl_priv *priv =504499 container_of(work, struct iwl_priv, scan_completed);500500+ bool internal = false;505501506502 IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");507503508504 cancel_delayed_work(&priv->scan_check);509505510510- if (!priv->is_internal_short_scan)511511- ieee80211_scan_completed(priv->hw, false);512512- else {506506+ mutex_lock(&priv->mutex);507507+ if (priv->is_internal_short_scan) {513508 priv->is_internal_short_scan = false;514509 IWL_DEBUG_SCAN(priv, "internal short scan completed\n");510510+ internal = true;515511 }512512+ mutex_unlock(&priv->mutex);513513+514514+ /*515515+ * Do not hold mutex here since this will cause mac80211 to call516516+ * into driver again into functions that will attempt to take517517+ * mutex.518518+ */519519+ if (!internal)520520+ ieee80211_scan_completed(priv->hw, false);516521517522 if (test_bit(STATUS_EXIT_PENDING, &priv->status))518523 return;
+1-1
drivers/net/wireless/iwlwifi/iwl-sta.c
···431431 struct iwl_link_quality_cmd *link_cmd;432432 unsigned long flags;433433434434- if (*sta_id_r)434434+ if (sta_id_r)435435 *sta_id_r = IWL_INVALID_STATION;436436437437 ret = iwl_add_station_common(priv, addr, 0, NULL, &sta_id);
···815815 * encrypted in hardware.816816 * @alg: The key algorithm.817817 * @flags: key flags, see &enum ieee80211_key_flags.818818+ * @ap_addr: AP's MAC address818819 * @keyidx: the key index (0-3)819820 * @keylen: key material length820821 * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte)···832831 u8 iv_len;833832 u8 hw_key_idx;834833 u8 flags;835835- u8 *ap_addr;836834 s8 keyidx;837835 u8 keylen;838836 u8 key[0];···16371637 * that TX/RX_STOP can pass NULL for this parameter.16381638 * Returns a negative error code on failure.16391639 * The callback must be atomic.16401640+ *16411641+ * @get_survey: Return per-channel survey information16401642 *16411643 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also16421644 * need to set wiphy->rfkill_poll to %true before registration,
-1
net/mac80211/key.c
···140140 struct ieee80211_sub_if_data,141141 u.ap);142142143143- key->conf.ap_addr = sdata->dev->dev_addr;144143 ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf);145144146145 if (!ret) {
+1-1
net/mac80211/sta_info.h
···145145/**146146 * struct sta_ampdu_mlme - STA aggregation information.147147 *148148- * @tid_state_rx: TID's state in Rx session state machine.148148+ * @tid_active_rx: TID's state in Rx session state machine.149149 * @tid_rx: aggregation info for Rx per TID150150 * @tid_state_tx: TID's state in Tx session state machine.151151 * @tid_tx: aggregation info for Tx per TID
+1-1
net/wireless/chan.c
···5050 struct ieee80211_channel *chan;5151 int result;52525353- if (wdev->iftype == NL80211_IFTYPE_MONITOR)5353+ if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)5454 wdev = NULL;55555656 if (wdev) {