diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2014-06-12 16:24:31 -0400 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-19 12:46:09 -0500 |
| commit | a344d6778a98e4c19ac871f369e399e6356edcb3 (patch) | |
| tree | 57680bfd10fc013c7a996fbea7212be900f089db | |
| parent | 6ea0a69ca21bbddab5b3979c2190013b0263e749 (diff) | |
mac80211: allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR
Allow drivers to support NL80211_SCAN_FLAG_RANDOM_ADDR with software
based scanning and generate a random MAC address for them for every
scan request with the flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
24 files changed, 166 insertions, 72 deletions
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c index ab2709a43768..19eab2a69ad5 100644 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c | |||
| @@ -547,7 +547,9 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
| 547 | 547 | ||
| 548 | 548 | ||
| 549 | static void | 549 | static void |
| 550 | ath5k_sw_scan_start(struct ieee80211_hw *hw) | 550 | ath5k_sw_scan_start(struct ieee80211_hw *hw, |
| 551 | struct ieee80211_vif *vif, | ||
| 552 | const u8 *mac_addr) | ||
| 551 | { | 553 | { |
| 552 | struct ath5k_hw *ah = hw->priv; | 554 | struct ath5k_hw *ah = hw->priv; |
| 553 | if (!ah->assoc) | 555 | if (!ah->assoc) |
| @@ -556,7 +558,7 @@ ath5k_sw_scan_start(struct ieee80211_hw *hw) | |||
| 556 | 558 | ||
| 557 | 559 | ||
| 558 | static void | 560 | static void |
| 559 | ath5k_sw_scan_complete(struct ieee80211_hw *hw) | 561 | ath5k_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif) |
| 560 | { | 562 | { |
| 561 | struct ath5k_hw *ah = hw->priv; | 563 | struct ath5k_hw *ah = hw->priv; |
| 562 | ath5k_hw_set_ledstate(ah, ah->assoc ? | 564 | ath5k_hw_set_ledstate(ah, ah->assoc ? |
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 794d52016437..206665059d66 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c | |||
| @@ -963,7 +963,7 @@ static void ath_scan_send_probe(struct ath_softc *sc, | |||
| 963 | struct ieee80211_tx_info *info; | 963 | struct ieee80211_tx_info *info; |
| 964 | int band = sc->offchannel.chan.chandef.chan->band; | 964 | int band = sc->offchannel.chan.chandef.chan->band; |
| 965 | 965 | ||
| 966 | skb = ieee80211_probereq_get(sc->hw, vif, | 966 | skb = ieee80211_probereq_get(sc->hw, vif->addr, |
| 967 | ssid->ssid, ssid->ssid_len, req->ie_len); | 967 | ssid->ssid, ssid->ssid_len, req->ie_len); |
| 968 | if (!skb) | 968 | if (!skb) |
| 969 | return; | 969 | return; |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index c7d12efaa86a..92d5a6c5a225 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
| @@ -1691,7 +1691,9 @@ static int ath9k_htc_ampdu_action(struct ieee80211_hw *hw, | |||
| 1691 | return ret; | 1691 | return ret; |
| 1692 | } | 1692 | } |
| 1693 | 1693 | ||
| 1694 | static void ath9k_htc_sw_scan_start(struct ieee80211_hw *hw) | 1694 | static void ath9k_htc_sw_scan_start(struct ieee80211_hw *hw, |
| 1695 | struct ieee80211_vif *vif, | ||
| 1696 | const u8 *mac_addr) | ||
| 1695 | { | 1697 | { |
| 1696 | struct ath9k_htc_priv *priv = hw->priv; | 1698 | struct ath9k_htc_priv *priv = hw->priv; |
| 1697 | struct ath_common *common = ath9k_hw_common(priv->ah); | 1699 | struct ath_common *common = ath9k_hw_common(priv->ah); |
| @@ -1705,7 +1707,8 @@ static void ath9k_htc_sw_scan_start(struct ieee80211_hw *hw) | |||
| 1705 | mutex_unlock(&priv->mutex); | 1707 | mutex_unlock(&priv->mutex); |
| 1706 | } | 1708 | } |
| 1707 | 1709 | ||
| 1708 | static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw) | 1710 | static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw, |
| 1711 | struct ieee80211_vif *vif) | ||
| 1709 | { | 1712 | { |
| 1710 | struct ath9k_htc_priv *priv = hw->priv; | 1713 | struct ath9k_htc_priv *priv = hw->priv; |
| 1711 | struct ath_common *common = ath9k_hw_common(priv->ah); | 1714 | struct ath_common *common = ath9k_hw_common(priv->ah); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 5f16630f26ce..027ad715ffb2 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -2180,14 +2180,17 @@ static int ath9k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant) | |||
| 2180 | return 0; | 2180 | return 0; |
| 2181 | } | 2181 | } |
| 2182 | 2182 | ||
| 2183 | static void ath9k_sw_scan_start(struct ieee80211_hw *hw) | 2183 | static void ath9k_sw_scan_start(struct ieee80211_hw *hw, |
| 2184 | struct ieee80211_vif *vif, | ||
| 2185 | const u8 *mac_addr) | ||
| 2184 | { | 2186 | { |
| 2185 | struct ath_softc *sc = hw->priv; | 2187 | struct ath_softc *sc = hw->priv; |
| 2186 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 2188 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
| 2187 | set_bit(ATH_OP_SCANNING, &common->op_flags); | 2189 | set_bit(ATH_OP_SCANNING, &common->op_flags); |
| 2188 | } | 2190 | } |
| 2189 | 2191 | ||
| 2190 | static void ath9k_sw_scan_complete(struct ieee80211_hw *hw) | 2192 | static void ath9k_sw_scan_complete(struct ieee80211_hw *hw, |
| 2193 | struct ieee80211_vif *vif) | ||
| 2191 | { | 2194 | { |
| 2192 | struct ath_softc *sc = hw->priv; | 2195 | struct ath_softc *sc = hw->priv; |
| 2193 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); | 2196 | struct ath_common *common = ath9k_hw_common(sc->sc_ah); |
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index b71d2b33532d..267c35d1f699 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c | |||
| @@ -494,7 +494,9 @@ out: | |||
| 494 | return ret; | 494 | return ret; |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw) | 497 | static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw, |
| 498 | struct ieee80211_vif *vif, | ||
| 499 | const u8 *mac_addr) | ||
| 498 | { | 500 | { |
| 499 | struct wcn36xx *wcn = hw->priv; | 501 | struct wcn36xx *wcn = hw->priv; |
| 500 | 502 | ||
| @@ -502,7 +504,8 @@ static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw) | |||
| 502 | wcn36xx_smd_start_scan(wcn); | 504 | wcn36xx_smd_start_scan(wcn); |
| 503 | } | 505 | } |
| 504 | 506 | ||
| 505 | static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw) | 507 | static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw, |
| 508 | struct ieee80211_vif *vif) | ||
| 506 | { | 509 | { |
| 507 | struct wcn36xx *wcn = hw->priv; | 510 | struct wcn36xx *wcn = hw->priv; |
| 508 | 511 | ||
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 5d4173ee55bc..47731cb0d815 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
| @@ -5110,7 +5110,9 @@ static void b43_op_sta_notify(struct ieee80211_hw *hw, | |||
| 5110 | B43_WARN_ON(!vif || wl->vif != vif); | 5110 | B43_WARN_ON(!vif || wl->vif != vif); |
| 5111 | } | 5111 | } |
| 5112 | 5112 | ||
| 5113 | static void b43_op_sw_scan_start_notifier(struct ieee80211_hw *hw) | 5113 | static void b43_op_sw_scan_start_notifier(struct ieee80211_hw *hw, |
| 5114 | struct ieee80211_vif *vif, | ||
| 5115 | const u8 *mac_addr) | ||
| 5114 | { | 5116 | { |
| 5115 | struct b43_wl *wl = hw_to_b43_wl(hw); | 5117 | struct b43_wl *wl = hw_to_b43_wl(hw); |
| 5116 | struct b43_wldev *dev; | 5118 | struct b43_wldev *dev; |
| @@ -5124,7 +5126,8 @@ static void b43_op_sw_scan_start_notifier(struct ieee80211_hw *hw) | |||
| 5124 | mutex_unlock(&wl->mutex); | 5126 | mutex_unlock(&wl->mutex); |
| 5125 | } | 5127 | } |
| 5126 | 5128 | ||
| 5127 | static void b43_op_sw_scan_complete_notifier(struct ieee80211_hw *hw) | 5129 | static void b43_op_sw_scan_complete_notifier(struct ieee80211_hw *hw, |
| 5130 | struct ieee80211_vif *vif) | ||
| 5128 | { | 5131 | { |
| 5129 | struct b43_wl *wl = hw_to_b43_wl(hw); | 5132 | struct b43_wl *wl = hw_to_b43_wl(hw); |
| 5130 | struct b43_wldev *dev; | 5133 | struct b43_wldev *dev; |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 43c71bfaa474..f95b52442281 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
| @@ -764,7 +764,9 @@ brcms_ops_configure_filter(struct ieee80211_hw *hw, | |||
| 764 | return; | 764 | return; |
| 765 | } | 765 | } |
| 766 | 766 | ||
| 767 | static void brcms_ops_sw_scan_start(struct ieee80211_hw *hw) | 767 | static void brcms_ops_sw_scan_start(struct ieee80211_hw *hw, |
| 768 | struct ieee80211_vif *vif, | ||
| 769 | const | ||
