|
@@ -1195,6 +1195,36 @@ static void wma_objmgr_set_peer_mlme_phymode(tp_wma_handle wma,
|
|
|
wlan_objmgr_peer_release_ref(peer, WLAN_LEGACY_WMA_ID);
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * wma_objmgr_set_peer_mlme_type() - set peer type to peer object
|
|
|
+ * @wma: wma handle
|
|
|
+ * @mac_addr: mac addr of peer
|
|
|
+ * @peer_type: peer type value to set
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+static void wma_objmgr_set_peer_mlme_type(tp_wma_handle wma,
|
|
|
+ uint8_t *mac_addr,
|
|
|
+ enum wlan_peer_type peer_type)
|
|
|
+{
|
|
|
+ uint8_t pdev_id;
|
|
|
+ struct wlan_objmgr_peer *peer;
|
|
|
+ struct wlan_objmgr_psoc *psoc = wma->psoc;
|
|
|
+
|
|
|
+ pdev_id = wlan_objmgr_pdev_get_pdev_id(wma->pdev);
|
|
|
+ peer = wlan_objmgr_get_peer(psoc, pdev_id, mac_addr,
|
|
|
+ WLAN_LEGACY_WMA_ID);
|
|
|
+ if (!peer) {
|
|
|
+ WMA_LOGE(FL("peer object null"));
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ wlan_peer_obj_lock(peer);
|
|
|
+ wlan_peer_set_peer_type(peer, peer_type);
|
|
|
+ wlan_peer_obj_unlock(peer);
|
|
|
+ wlan_objmgr_peer_release_ref(peer, WLAN_LEGACY_WMA_ID);
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* wmi_unified_send_peer_assoc() - send peer assoc command to fw
|
|
|
* @wma: wma handle
|
|
@@ -1384,8 +1414,11 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
|
|
|
cmd->peer_flags |= WMI_PEER_160MHZ;
|
|
|
|
|
|
cmd->peer_vht_caps = params->vht_caps;
|
|
|
- if (params->p2pCapableSta)
|
|
|
+ if (params->p2pCapableSta) {
|
|
|
cmd->peer_flags |= WMI_PEER_IS_P2P_CAPABLE;
|
|
|
+ wma_objmgr_set_peer_mlme_type(wma, params->staMac,
|
|
|
+ WLAN_PEER_P2P_CLI);
|
|
|
+ }
|
|
|
|
|
|
if (params->rmfEnabled)
|
|
|
cmd->peer_flags |= WMI_PEER_PMF;
|