Browse Source

qcacld-3.0: Add functions for assoc completion for connection manager

There are few functions which were missing for association completion
for connection manager functionality, add those missing functions
for association completion handler.

Change-Id: Iaca6599921fa73972553a8bd805b2f39ad580407
CRs-Fixed: 2846083
Ashish Kumar Dhanotiya 4 years ago
parent
commit
68b0198490

+ 5 - 0
components/mlme/core/inc/wlan_mlme_main.h

@@ -218,6 +218,9 @@ struct mscs_req_info {
  * @oem_channel_info: oem channel info
  * @tdls_chan_swit_prohibited: if tdls chan switch is prohobited by AP
  * @tdls_prohibited: if tdls is prohobited by AP
+ * @uapsd_per_ac_bitmask: Used on STA, this is a static UAPSD mask setting
+ * derived from JOIN_REQ and REASSOC_REQ. If a particular AC bit is set, it
+ * means the AC is both trigger enabled and delivery enabled.
  */
 struct mlme_connect_info {
 	uint8_t timing_meas_cap;
@@ -226,6 +229,7 @@ struct mlme_connect_info {
 	bool tdls_chan_swit_prohibited;
 	bool tdls_prohibited;
 #endif
+	uint8_t uapsd_per_ac_bitmask;
 };
 
 /**
@@ -257,6 +261,7 @@ struct mlme_connect_info {
  * @mscs_req_info: Information related to mscs request
  * @he_config: he config
  * @he_sta_obsspd: he_sta_obsspd
+ * @connect_info: mlme connect information
  */
 struct mlme_legacy_priv {
 	bool chan_switch_in_progress;

+ 10 - 2
core/hdd/inc/wlan_hdd_assoc.h

@@ -368,9 +368,17 @@ QDF_STATUS hdd_update_dp_vdev_flags(void *cbk_data,
 				    uint32_t vdev_param,
 				    bool is_link_up);
 
+/**
+ * hdd_roam_register_sta() - register station
+ * @adapter: pointer to adapter
+ * @bssid: bssid of the connection
+ * @is_auth_required: is upper layer authenticatoin required
+ *
+ * Return: QDF_STATUS enumeration
+ */
 QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
-				 struct csr_roam_info *roam_info,
-				 struct bss_description *bss_desc);
+				 struct qdf_mac_addr *bssid,
+				 bool is_auth_required);
 
 /**
  * hdd_save_peer() - Save peer MAC address in adapter peer table.

+ 4 - 5
core/hdd/inc/wlan_hdd_wmm.h

@@ -309,15 +309,14 @@ QDF_STATUS hdd_wmm_acquire_access(struct hdd_adapter *adapter,
  * hdd_wmm_assoc() - Function which will handle the housekeeping
  * required by WMM when association takes place
  *
- * @adapter: [in]  pointer to adapter context
- * @roam_info: [in]  pointer to roam information
- * @bss_type: [in]  type of BSS
+ * @adapter:  pointer to adapter context
+ * @is_reassoc: is this reassoc scenario
+ * @uapsd_mask : Negotiated uapsd msk
  *
  * Return: QDF_STATUS enumeration
  */
 QDF_STATUS hdd_wmm_assoc(struct hdd_adapter *adapter,
-			 struct csr_roam_info *roam_info,
-			 eCsrRoamBssType bss_type);
+			 bool is_reassoc, uint8_t uapsd_mask);
 
 /**
  * hdd_wmm_connect() - Function which will handle the housekeeping

+ 26 - 76
core/hdd/src/wlan_hdd_assoc.c

@@ -2029,14 +2029,12 @@ QDF_STATUS hdd_update_dp_vdev_flags(void *cbk_data,
 /**
  * hdd_conn_change_peer_state() - Change the state of the peer
  * @adapter: pointer to adapter
- * @roam_info: pointer to roam info
  * @mac_addr: peer mac address
  * @sta_state: peer state
  *
  * Return: QDF_STATUS enumeration
  */
 static QDF_STATUS hdd_conn_change_peer_state(struct hdd_adapter *adapter,
-					     struct csr_roam_info *roam_info,
 					     uint8_t *mac_addr,
 					     enum ol_txrx_peer_state sta_state)
 {
@@ -2065,31 +2063,19 @@ hdd_rx_register_fisa_ops(struct ol_txrx_ops *txrx_ops)
 }
 #endif
 
-/**
- * hdd_roam_register_sta() - register station
- * @adapter: pointer to adapter
- * @roam_info: pointer to roam info
- * @sta_id: station identifier
- * @bss_desc: pointer to BSS description
- *
- * Return: QDF_STATUS enumeration
- */
 QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
-					struct csr_roam_info *roam_info,
-					struct bss_description *bss_desc)
+				 struct qdf_mac_addr *bssid,
+				 bool is_auth_required)
 {
 	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
 	struct ol_txrx_desc_type txrx_desc = {0};
 	struct ol_txrx_ops txrx_ops;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 
-	if (!bss_desc)
-		return QDF_STATUS_E_FAILURE;
-
 	/* Get the Station ID from the one saved during the association */
-	if (!QDF_IS_ADDR_BROADCAST(roam_info->bssid.bytes))
+	if (!QDF_IS_ADDR_BROADCAST(bssid->bytes))
 		WLAN_ADDR_COPY(txrx_desc.peer_addr.bytes,
-			       roam_info->bssid.bytes);
+			       bssid->bytes);
 	else
 		WLAN_ADDR_COPY(txrx_desc.peer_addr.bytes,
 			       adapter->mac_addr.bytes);
@@ -2149,13 +2135,13 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
 		return qdf_status;
 	}
 
-	if (!roam_info->fAuthRequired) {
+	if (!is_auth_required) {
 		/*
 		 * Connections that do not need Upper layer auth, transition
 		 * TLSHIM directly to 'Authenticated' state
 		 */
 		qdf_status = hdd_conn_change_peer_state(
-						adapter, roam_info,
+						adapter,
 						txrx_desc.peer_addr.bytes,
 						OL_TXRX_PEER_STATE_AUTH);
 
@@ -2167,7 +2153,7 @@ QDF_STATUS hdd_roam_register_sta(struct hdd_adapter *adapter,
 			  QDF_MAC_ADDR_REF(txrx_desc.peer_addr.bytes));
 
 		qdf_status = hdd_conn_change_peer_state(
-						adapter, roam_info,
+						adapter,
 						txrx_desc.peer_addr.bytes,
 						OL_TXRX_PEER_STATE_CONN);
 
@@ -2605,46 +2591,8 @@ void hdd_clear_fils_connection_info(struct hdd_adapter *adapter)
 }
 #endif
 
-/**
- * hdd_netif_queue_enable() - Enable the network queue for a
- *			      particular adapter.
- * @adapter: pointer to the adapter structure
- *
- * This function schedules a work to update the netdev features
- * and enable the network queue if the feature "disable checksum/tso
- * for legacy connections" is enabled via INI. If not, it will
- * retain the existing behavior by just enabling the network queues.
- *
- * Returns: none
- */
-static inline void hdd_netif_queue_enable(struct hdd_adapter *adapter)
-{
-	ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
-	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-
-	if (cdp_cfg_get(soc, cfg_dp_disable_legacy_mode_csum_offload)) {
-		hdd_adapter_ops_record_event(hdd_ctx,
-					     WLAN_HDD_ADAPTER_OPS_WORK_POST,
-					     adapter->vdev_id);
-		qdf_queue_work(0, hdd_ctx->adapter_ops_wq,
-			       &adapter->netdev_features_update_work);
-	} else {
-		wlan_hdd_netif_queue_control(adapter,
-					     WLAN_WAKE_ALL_NETIF_QUEUE,
-					     WLAN_CONTROL_PATH);
-	}
-}
 
 #ifndef FEATURE_CM_ENABLE
-static void hdd_save_connect_status(struct hdd_adapter *adapter,
-				    struct csr_roam_info *roam_info)
-{
-	if (!roam_info)
-		return;
-
-	adapter->connect_req_status = roam_info->reasonCode;
-}
-
 /**
  * hdd_association_completion_handler() - association completion handler
  * @adapter: pointer to adapter
@@ -2677,6 +2625,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 	uint32_t conn_info_freq;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	struct if_mgr_event_data *connect_complete;
+	uint8_t uapsd_mask;
 
 	if (!hdd_ctx) {
 		hdd_err("HDD context is NULL");
@@ -2689,9 +2638,16 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
+	if (!roam_info) {
+		hdd_err("roam_info is NULL");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	uapsd_mask =
+		roam_info->u.pConnectedProfile->modifyProfileFields.uapsd_mask;
 	hdd_cm_update_rssi_snr_by_bssid(adapter);
 
-	hdd_save_connect_status(adapter, roam_info);
+	hdd_cm_save_connect_status(adapter, roam_info->reasonCode);
 	/*
 	 * reset scan reject params if connection is success or we received
 	 * final failure from CSR after trying with all APs.
@@ -2716,10 +2672,6 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 	mac_handle = hdd_ctx->mac_handle;
 
 	if (eCSR_ROAM_RESULT_ASSOCIATED == roam_result) {
-		if (!roam_info) {
-			hdd_err("roam_info is NULL");
-			return QDF_STATUS_E_FAILURE;
-		}
 		if (!hddDisconInProgress) {
 			hdd_conn_set_connection_state(adapter,
 						   eConnectionState_Associated);
@@ -3089,17 +3041,17 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 				 * Perform any WMM-related association
 				 * processing.
 				 */
-				hdd_wmm_assoc(adapter, roam_info,
-					      eCSR_BSS_TYPE_INFRASTRUCTURE);
+				hdd_wmm_assoc(adapter, roam_info->fReassocReq,
+					      uapsd_mask);
 
 				/*
 				 * Register the Station with DP after associated
 				 */
 				qdf_status = hdd_roam_register_sta(adapter,
-						roam_info,
-						roam_info->bss_desc);
+						&roam_info->bssid,
+						roam_info->fAuthRequired);
 				hdd_debug("Enabling queues");
-				hdd_netif_queue_enable(adapter);
+				hdd_cm_netif_queue_enable(adapter);
 			}
 		} else {
 			/*
@@ -3146,13 +3098,13 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 				 * Perform any WMM-related association
 				 * processing
 				 */
-				hdd_wmm_assoc(adapter, roam_info,
-					      eCSR_BSS_TYPE_INFRASTRUCTURE);
+				hdd_wmm_assoc(adapter, roam_info->fReassocReq,
+					      uapsd_mask);
 			}
 
 			/* Start the tx queues */
 			hdd_debug("Enabling queues");
-			hdd_netif_queue_enable(adapter);
+			hdd_cm_netif_queue_enable(adapter);
 		}
 		qdf_mem_free(reqRsnIe);
 
@@ -3160,10 +3112,8 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
 			hdd_err("STA register with TL failed status: %d [%08X]",
 				qdf_status, qdf_status);
 		}
-#ifdef WLAN_FEATURE_11W
-		qdf_mem_zero(&adapter->hdd_stats.hdd_pmf_stats,
-			     sizeof(adapter->hdd_stats.hdd_pmf_stats));
-#endif
+		hdd_cm_clear_pmf_stats(adapter);
+
 		if (adapter->device_mode == QDF_STA_MODE) {
 			ucfg_blm_update_bssid_connect_params(hdd_ctx->pdev,
 							     roam_info->bssid,

+ 39 - 0
core/hdd/src/wlan_hdd_cm_api.h

@@ -148,4 +148,43 @@ void hdd_cm_update_rssi_snr_by_bssid(struct hdd_adapter *adapter);
 void hdd_cm_handle_assoc_event(struct wlan_objmgr_vdev *vdev,
 			       uint8_t *peer_mac);
 
+/**
+ * hdd_cm_netif_queue_enable() - Enable the network queue for a
+ *			      particular adapter.
+ * @adapter: pointer to the adapter structure
+ *
+ * This function schedules a work to update the netdev features
+ * and enable the network queue if the feature "disable checksum/tso
+ * for legacy connections" is enabled via INI. If not, it will
+ * retain the existing behavior by just enabling the network queues.
+ *
+ * Returns: none
+ */
+void hdd_cm_netif_queue_enable(struct hdd_adapter *adapter);
+
+#ifdef WLAN_FEATURE_11W
+/**
+ * hdd_cm_clear_pmf_stats() - Clear pmf stats
+ * @adapter: pointer to the adapter structure
+ *
+ * Returns: None
+ */
+
+void hdd_cm_clear_pmf_stats(struct hdd_adapter *adapter);
+#else
+static inline void hdd_cm_clear_pmf_stats(struct hdd_adapter *adapter)
+{
+}
+#endif
+
+/**
+ * hdd_cm_save_connect_status() - Save connect status
+ * @adapter: pointer to the adapter structure
+ * @reason_code: IEE80211 wlan status code
+ *
+ * Returns: None
+ */
+void hdd_cm_save_connect_status(struct hdd_adapter *adapter,
+				uint32_t reason_code);
+
 #endif

+ 116 - 17
core/hdd/src/wlan_hdd_cm_connect.c

@@ -114,7 +114,56 @@ void hdd_cm_handle_assoc_event(struct wlan_objmgr_vdev *vdev, uint8_t *peer_mac)
 		ucfg_pkt_capture_record_channel(adapter->vdev);
 }
 
+void hdd_cm_netif_queue_enable(struct hdd_adapter *adapter)
+{
+	ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
+	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+
+	if (cdp_cfg_get(soc, cfg_dp_disable_legacy_mode_csum_offload)) {
+		hdd_adapter_ops_record_event(hdd_ctx,
+					     WLAN_HDD_ADAPTER_OPS_WORK_POST,
+					     adapter->vdev_id);
+		qdf_queue_work(0, hdd_ctx->adapter_ops_wq,
+			       &adapter->netdev_features_update_work);
+	} else {
+		wlan_hdd_netif_queue_control(adapter,
+					     WLAN_WAKE_ALL_NETIF_QUEUE,
+					     WLAN_CONTROL_PATH);
+	}
+}
+
+#ifdef WLAN_FEATURE_11W
+void hdd_cm_clear_pmf_stats(struct hdd_adapter *adapter)
+{
+	qdf_mem_zero(&adapter->hdd_stats.hdd_pmf_stats,
+		     sizeof(adapter->hdd_stats.hdd_pmf_stats));
+}
+#endif
+
+void hdd_cm_save_connect_status(struct hdd_adapter *adapter,
+				uint32_t reason_code)
+{
+	adapter->connect_req_status = reason_code;
+}
+
 #ifdef FEATURE_CM_ENABLE
+
+#ifdef FEATURE_WLAN_WAPI
+static bool hdd_cm_is_wapi_sta(enum csr_akm_type auth_type)
+{
+	if (auth_type == eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE ||
+	    auth_type == eCSR_AUTH_TYPE_WAPI_WAI_PSK)
+		return true;
+	else
+		return false;
+}
+#else
+static inline bool hdd_cm_is_wapi_sta(enum csr_akm_type auth_type)
+{
+	return false;
+}
+#endif
+
 static void hdd_update_scan_ie_for_connect(struct hdd_adapter *adapter,
 					   struct osif_connect_params *params)
 {
@@ -372,6 +421,10 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
 	struct wlan_crypto_params *crypto_params;
 	struct wlan_channel *des_chan;
 	struct wlan_objmgr_vdev *vdev;
+	uint8_t *ie_field;
+	uint32_t ie_len, status;
+	tDot11fBeaconIEs *bcn_ie;
+	mac_handle_t mac_handle = hdd_adapter_get_mac_handle(adapter);
 
 	if (!adapter) {
 		hdd_err("adapter is NULL");
@@ -384,8 +437,14 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
 		return;
 	}
 
+	bcn_ie = qdf_mem_malloc(sizeof(*bcn_ie));
+	if (!bcn_ie)
+		return;
+
 	qdf_copy_macaddr(&sta_ctx->conn_info.bssid, &rsp->bssid);
 
+	/* hdd_wmm_connect(adapter, roam_info, bss_type); */
+
 	crypto_params = wlan_crypto_vdev_get_crypto_params(adapter->vdev);
 
 	sme_fill_enc_type(&sta_ctx->conn_info.uc_encrypt_type,
@@ -415,6 +474,28 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
 
 	sta_ctx->conn_info.ch_width = des_chan->ch_width;
 
+	ie_len = (rsp->connect_ies.bcn_probe_rsp.len -
+			sizeof(struct wlan_frame_hdr) -
+			offsetof(struct wlan_bcn_frame, ie));
+	ie_field = (uint8_t *)(rsp->connect_ies.bcn_probe_rsp.ptr +
+				sizeof(struct wlan_frame_hdr) +
+				offsetof(struct wlan_bcn_frame, ie));
+
+	status = dot11f_unpack_beacon_i_es(MAC_CONTEXT(mac_handle), ie_field,
+					   ie_len, bcn_ie, false);
+
+	if (!DOT11F_SUCCEEDED(status)) {
+		hdd_err("Failed to parse beacon ie");
+		qdf_mem_free(bcn_ie);
+		return;
+	}
+	if (bcn_ie->ExtCap.present) {
+		struct s_ext_cap *p_ext_cap = (struct s_ext_cap *)
+						bcn_ie->ExtCap.bytes;
+		sta_ctx->conn_info.proxy_arp_service =
+						p_ext_cap->proxy_arp_service;
+	}
+
 	vdev = hdd_objmgr_get_vdev(adapter);
 	if (vdev) {
 		sta_ctx->conn_info.nss = wlan_vdev_mlme_get_nss(vdev);
@@ -424,10 +505,6 @@ static void hdd_cm_save_connect_info(struct hdd_adapter *adapter,
 	}
 
 	hdd_cm_save_bss_info(adapter, rsp);
-	/*
-	 *  proxy arp service, notify WMM
-	 * hdd_wmm_connect(adapter, roam_info, bss_type);
-	 */
 }
 
 static void
@@ -436,8 +513,11 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 {
 	struct hdd_context *hdd_ctx;
 	struct hdd_adapter *adapter;
+	struct hdd_station_ctx *sta_ctx;
 	struct vdev_mlme_obj *vdev_mlme;
 	unsigned long rc;
+	uint32_t ie_len;
+	uint8_t *ie_field;
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
@@ -451,20 +531,41 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 		return;
 	}
 
+	sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
+	if (!sta_ctx) {
+		hdd_err("sta_ctx is NULL");
+		return;
+	}
+
 	hdd_cm_update_rssi_snr_by_bssid(adapter);
+	hdd_cm_save_connect_status(adapter, rsp->status_code);
 
 	hdd_cm_save_connect_info(adapter, rsp);
 
 	if (hdd_add_beacon_filter(adapter) != 0)
 		hdd_err("add beacon fileter failed");
 
-	/*
-	 * FEATURE_WLAN_WAPI, hdd_send_association_event,
-	 */
+	adapter->wapi_info.is_wapi_sta = hdd_cm_is_wapi_sta(
+						sta_ctx->conn_info.auth_type);
+
+	ie_len = (rsp->connect_ies.bcn_probe_rsp.len -
+			sizeof(struct wlan_frame_hdr) -
+			offsetof(struct wlan_bcn_frame, ie));
+
+	ie_field  = (uint8_t *)(rsp->connect_ies.bcn_probe_rsp.ptr +
+				sizeof(struct wlan_frame_hdr) +
+				offsetof(struct wlan_bcn_frame, ie));
+
+	sta_ctx->ap_supports_immediate_power_save =
+				wlan_hdd_is_ap_supports_immediate_power_save(
+				     ie_field, ie_len);
+	hdd_debug("ap_supports_immediate_power_save flag [%d]",
+		  sta_ctx->ap_supports_immediate_power_save);
 
 	hdd_green_ap_start_state_mc(hdd_ctx, adapter->device_mode, true);
 
 	hdd_cm_handle_assoc_event(vdev, rsp->bssid.bytes);
+
 	/*
 	 * check update hdd_send_update_beacon_ies_event,
 	 * hdd_send_ft_assoc_response,
@@ -543,24 +644,23 @@ hdd_cm_connect_success_post_user_update(struct wlan_objmgr_vdev *vdev,
 						wlan_vdev_get_id(vdev));
 	struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-
-	/*
-	 * check for hdd_wmm_assoc, wlan_hdd_send_roam_auth_event,
-	 * hdd_roam_register_sta
-	 */
+	struct vdev_mlme_obj *mlme_obj = wlan_vdev_mlme_get_cmpt_obj(vdev);
+	uint8_t uapsd_mask =
+		mlme_obj->ext_vdev_ptr->connect_info.uapsd_per_ac_bitmask;
 
 	qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.connect);
 	hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_CONNECT);
 
 	cdp_hl_fc_set_td_limit(soc, adapter->vdev_id,
 			       sta_ctx->conn_info.chan_freq);
+	hdd_wmm_assoc(adapter, false, uapsd_mask);
+
+	hdd_roam_register_sta(adapter, &rsp->bssid, false);
 
 	hdd_debug("Enabling queues");
+	hdd_cm_netif_queue_enable(adapter);
 
-	/*
-	 * hdd_netif_queue_enable(adapter); this is static function
-	 * will enable this once this code is enabled
-	 */
+	hdd_cm_clear_pmf_stats(adapter);
 
 	/* Inform FTM TIME SYNC about the connection with AP */
 	hdd_ftm_time_sync_sta_state_notify(adapter,
@@ -597,4 +697,3 @@ QDF_STATUS hdd_cm_connect_complete(struct wlan_objmgr_vdev *vdev,
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-

+ 6 - 0
core/hdd/src/wlan_hdd_cm_disconnect.c

@@ -327,6 +327,12 @@ QDF_STATUS hdd_cm_netif_queue_control(struct wlan_objmgr_vdev *vdev,
 				      enum netif_action_type action,
 				      enum netif_reason_type reason)
 {
+	struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+	struct hdd_adapter *adapter = hdd_get_adapter_by_vdev(hdd_ctx,
+					wlan_vdev_get_id(vdev));
+
+	wlan_hdd_netif_queue_control(adapter, action, reason);
+
 	return QDF_STATUS_SUCCESS;
 }
 #endif

+ 4 - 6
core/hdd/src/wlan_hdd_nan_datapath.c

@@ -744,7 +744,6 @@ void hdd_ndi_drv_ndi_create_rsp_handler(uint8_t vdev_id,
 	struct hdd_adapter *adapter;
 	struct hdd_station_ctx *sta_ctx;
 	struct csr_roam_info *roam_info;
-	struct bss_description tmp_bss_descp = {0};
 	uint16_t ndp_inactivity_timeout = 0;
 	uint16_t ndp_keep_alive_period;
 	struct qdf_mac_addr bc_mac_addr = QDF_MAC_ADDR_BCAST_INIT;
@@ -809,7 +808,8 @@ void hdd_ndi_drv_ndi_create_rsp_handler(uint8_t vdev_id,
 
 	hdd_save_peer(sta_ctx, &bc_mac_addr);
 	qdf_copy_macaddr(&roam_info->bssid, &bc_mac_addr);
-	hdd_roam_register_sta(adapter, roam_info, &tmp_bss_descp);
+	hdd_roam_register_sta(adapter, &roam_info->bssid,
+			      roam_info->fAuthRequired);
 
 	qdf_mem_free(roam_info);
 }
@@ -898,7 +898,6 @@ int hdd_ndp_new_peer_handler(uint8_t vdev_id, uint16_t sta_id,
 	struct hdd_context *hdd_ctx;
 	struct hdd_adapter *adapter;
 	struct hdd_station_ctx *sta_ctx;
-	struct bss_description tmp_bss_descp = {0};
 	struct csr_roam_info *roam_info;
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
@@ -929,9 +928,8 @@ int hdd_ndp_new_peer_handler(uint8_t vdev_id, uint16_t sta_id,
 	qdf_copy_macaddr(&roam_info->bssid, peer_mac_addr);
 
 	/* this function is called for each new peer */
-	hdd_roam_register_sta(adapter, roam_info, &tmp_bss_descp);
-
-	qdf_copy_macaddr(&roam_info->bssid, peer_mac_addr);
+	hdd_roam_register_sta(adapter, &roam_info->bssid,
+			      roam_info->fAuthRequired);
 
 	/* perform following steps for first new peer ind */
 	if (fist_peer) {

+ 2 - 17
core/hdd/src/wlan_hdd_wmm.c

@@ -2204,21 +2204,9 @@ QDF_STATUS hdd_wmm_acquire_access(struct hdd_adapter *adapter,
 	return QDF_STATUS_SUCCESS;
 }
 
-/**
- * hdd_wmm_assoc() - Function which will handle the housekeeping
- * required by WMM when association takes place
- *
- * @adapter: [in]  pointer to adapter context
- * @roam_info: [in]  pointer to roam information
- * @bss_type: [in]  type of BSS
- *
- * Return: QDF_STATUS enumeration
- */
 QDF_STATUS hdd_wmm_assoc(struct hdd_adapter *adapter,
-			 struct csr_roam_info *roam_info,
-			 eCsrRoamBssType bss_type)
+			 bool is_reassoc, uint8_t uapsd_mask)
 {
-	uint8_t uapsd_mask;
 	QDF_STATUS status;
 	uint32_t srv_value = 0;
 	uint32_t sus_value = 0;
@@ -2231,7 +2219,7 @@ QDF_STATUS hdd_wmm_assoc(struct hdd_adapter *adapter,
 
 	hdd_enter();
 
-	if (roam_info->fReassocReq) {
+	if (is_reassoc) {
 		/* when we reassociate we should continue to use
 		 * whatever parameters were previously established.
 		 * if we are reassociating due to a U-APSD change for
@@ -2245,9 +2233,6 @@ QDF_STATUS hdd_wmm_assoc(struct hdd_adapter *adapter,
 
 		return QDF_STATUS_SUCCESS;
 	}
-	/* get the negotiated UAPSD Mask */
-	uapsd_mask =
-		roam_info->u.pConnectedProfile->modifyProfileFields.uapsd_mask;
 
 	hdd_debug("U-APSD mask is 0x%02x", (int)uapsd_mask);
 

+ 2 - 0
core/mac/src/pe/lim/lim_utils.c

@@ -8872,6 +8872,8 @@ QDF_STATUS lim_pre_vdev_start(struct mac_context *mac,
 
 	mlme_obj->proto.ht_info.allow_ht = !!session->htCapability;
 	mlme_obj->proto.vht_info.allow_vht = !!session->vhtCapability;
+	mlme_obj->ext_vdev_ptr->connect_info.uapsd_per_ac_bitmask =
+						session->gUapsdPerAcBitmask;
 
 	if (cds_is_5_mhz_enabled())
 		mlme_obj->mgmt.rate_info.quarter_rate = 1;