From d0f439e4cae6c9b8c64f148bb01edae1d317909b Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Tue, 15 Aug 2017 17:47:15 +0530 Subject: [PATCH] ath10k: Remove dedicated p2p_device interface capability for wcn3990 p2p_find uses primary interface mac address during active scan instead of the later created p2p interface on which wpa_supplicant is running. wpa_supplicant creates a p2p_device interface if the driver exposes a dedicated p2p_device interface capability. The mac address for the created p2p_device interface will be same as of the primary interface registered with the netdev. By disabling the dedicated p2p_device interface capabilty for wcn3990, wpa_supplicant uses the interface passed to it from commandline interface and hence will use the correct mac address for the active scan purpose. CRs-Fixed: 2092523 Change-Id: I42ff819bb195e5f5dd7fef9908786621996e93b7 Signed-off-by: Rakesh Pillai --- drivers/net/wireless/ath/ath10k/mac.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index cce931e51d7e..ec86c837e60a 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -7822,10 +7822,6 @@ static const struct ieee80211_iface_limit ath10k_wcn3990_if_limit[] = { BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO), }, - { - .max = 1, - .types = BIT(NL80211_IFTYPE_P2P_DEVICE), - }, }; static const struct ieee80211_iface_limit ath10k_wcn3990_qcs_if_limit[] = { @@ -7845,10 +7841,6 @@ static const struct ieee80211_iface_limit ath10k_wcn3990_qcs_if_limit[] = { #endif BIT(NL80211_IFTYPE_P2P_GO), }, - { - .max = 1, - .types = BIT(NL80211_IFTYPE_P2P_DEVICE), - }, }; static const struct ieee80211_iface_limit ath10k_wcn3990_if_limit_ibss[] = { @@ -8022,6 +8014,10 @@ int ath10k_mac_register(struct ath10k *ar) BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO); + if (QCA_REV_WCN3990(ar)) + ar->hw->wiphy->interface_modes &= + ~BIT(NL80211_IFTYPE_P2P_DEVICE); + ieee80211_hw_set(ar->hw, SIGNAL_DBM); ieee80211_hw_set(ar->hw, SUPPORTS_PS); ieee80211_hw_set(ar->hw, SUPPORTS_DYNAMIC_PS);