Prechádzať zdrojové kódy

qcacld-3.0: Start ap adapter from __wlan_hdd_add_virtual_intf

With SAP+STA concurrency there shall be a new interface created softap0 on
which SAP comes up. In the present scenario the support for starting
the ap adapter only via the change interface.
Since the SAP adapter is not started the start_bss request from the
upper layer fails.

To migitate the issue add support for the start ap adapter from the
 __wlan_hdd_add_virtual_intf.

Change-Id: I4d112441b5aa7ff91dafa9e43f9aceb18d0e13f0
CRs-Fixed: 1056331
Arun Khandavalli 8 rokov pred
rodič
commit
c67110c9b2
1 zmenil súbory, kde vykonal 11 pridanie a 3 odobranie
  1. 11 3
      core/hdd/src/wlan_hdd_p2p.c

+ 11 - 3
core/hdd/src/wlan_hdd_p2p.c

@@ -1956,7 +1956,7 @@ static uint8_t wlan_hdd_get_session_type(enum nl80211_iftype type)
  * @flags: moniter configuraiton flags (not used)
  * @vif_params: virtual interface parameters (not used)
  *
- * Return: the pointer of wireless dev, otherwise NULL.
+ * Return: the pointer of wireless dev, otherwise ERR_PTR.
  */
 struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
 						 const char *name,
@@ -2048,6 +2048,14 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
 		return ERR_PTR(-ENOSPC);
 	}
 
+	if (NL80211_IFTYPE_AP == type) {
+		ret = hdd_start_adapter(pAdapter);
+		if (ret) {
+			hdd_err("Failed to start %s", name);
+			return ERR_PTR(-EINVAL);
+		}
+	}
+
 	if (pHddCtx->rps)
 		hdd_send_rps_ind(pAdapter);
 
@@ -2065,7 +2073,7 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
  * @flags: monitor mode configuration flags (not used)
  * @vif_params: virtual interface parameters (not used)
  *
- * Return: the pointer of wireless dev, otherwise NULL.
+ * Return: the pointer of wireless dev, otherwise ERR_PTR.
  */
 struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
 					       const char *name,
@@ -2092,7 +2100,7 @@ struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
  * @flags: monitor mode configuration flags (not used)
  * @vif_params: virtual interface parameters (not used)
  *
- * Return: the pointer of wireless dev, otherwise NULL.
+ * Return: the pointer of wireless dev, otherwise ERR_PTR.
  */
 struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
 					       const char *name,