|
@@ -3020,12 +3020,32 @@ QDF_STATUS cm_notify_connect_complete(struct cnx_mgr *cm_ctx,
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
|
|
#ifdef WLAN_FEATURE_11BE_MLO_ADV_FEATURE
|
|
-static void cm_update_link_channel_info(struct wlan_objmgr_vdev *vdev,
|
|
|
|
- struct qdf_mac_addr *mac_addr,
|
|
|
|
- qdf_freq_t freq)
|
|
|
|
|
|
+static enum phy_ch_width
|
|
|
|
+cm_get_ch_width_from_phymode(enum wlan_phymode phy_mode)
|
|
|
|
+{
|
|
|
|
+ enum phy_ch_width ch_width;
|
|
|
|
+
|
|
|
|
+ if (IS_WLAN_PHYMODE_320MHZ(phy_mode))
|
|
|
|
+ ch_width = CH_WIDTH_320MHZ;
|
|
|
|
+ else if (IS_WLAN_PHYMODE_160MHZ(phy_mode))
|
|
|
|
+ ch_width = CH_WIDTH_160MHZ;
|
|
|
|
+ else if (IS_WLAN_PHYMODE_80MHZ(phy_mode))
|
|
|
|
+ ch_width = CH_WIDTH_80MHZ;
|
|
|
|
+ else if (IS_WLAN_PHYMODE_40MHZ(phy_mode))
|
|
|
|
+ ch_width = CH_WIDTH_40MHZ;
|
|
|
|
+ else
|
|
|
|
+ ch_width = CH_WIDTH_20MHZ;
|
|
|
|
+
|
|
|
|
+ return ch_width;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static
|
|
|
|
+void cm_update_link_channel_info(struct wlan_objmgr_vdev *vdev,
|
|
|
|
+ struct qdf_mac_addr *mac_addr,
|
|
|
|
+ qdf_freq_t freq)
|
|
{
|
|
{
|
|
- uint8_t link_id;
|
|
|
|
struct wlan_objmgr_pdev *pdev;
|
|
struct wlan_objmgr_pdev *pdev;
|
|
|
|
+ uint8_t link_id;
|
|
struct scan_cache_entry *cache_entry;
|
|
struct scan_cache_entry *cache_entry;
|
|
struct wlan_channel channel = {0};
|
|
struct wlan_channel channel = {0};
|
|
|
|
|
|
@@ -3037,14 +3057,14 @@ static void cm_update_link_channel_info(struct wlan_objmgr_vdev *vdev,
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- link_id = wlan_vdev_get_link_id(vdev);
|
|
|
|
|
|
+ link_id = cache_entry->ml_info.self_link_id;
|
|
|
|
+
|
|
channel.ch_freq = cache_entry->channel.chan_freq;
|
|
channel.ch_freq = cache_entry->channel.chan_freq;
|
|
channel.ch_ieee = wlan_reg_freq_to_chan(pdev, channel.ch_freq);
|
|
channel.ch_ieee = wlan_reg_freq_to_chan(pdev, channel.ch_freq);
|
|
channel.ch_phymode = cache_entry->phy_mode;
|
|
channel.ch_phymode = cache_entry->phy_mode;
|
|
channel.ch_cfreq1 = cache_entry->channel.cfreq0;
|
|
channel.ch_cfreq1 = cache_entry->channel.cfreq0;
|
|
channel.ch_cfreq2 = cache_entry->channel.cfreq1;
|
|
channel.ch_cfreq2 = cache_entry->channel.cfreq1;
|
|
- channel.ch_width =
|
|
|
|
- wlan_mlme_get_ch_width_from_phymode(cache_entry->phy_mode);
|
|
|
|
|
|
+ channel.ch_width = cm_get_ch_width_from_phymode(cache_entry->phy_mode);
|
|
/*
|
|
/*
|
|
* Supplicant needs non zero center_freq1 in case of 20 MHz connection
|
|
* Supplicant needs non zero center_freq1 in case of 20 MHz connection
|
|
* also as a response of get_channel request. In case of 20 MHz channel
|
|
* also as a response of get_channel request. In case of 20 MHz channel
|
|
@@ -3065,12 +3085,44 @@ static void cm_update_link_channel_info(struct wlan_objmgr_vdev *vdev,
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+void cm_update_scan_mlme_info(struct cnx_mgr *cm_ctx,
|
|
|
|
+ struct wlan_cm_connect_resp *resp)
|
|
|
|
+{
|
|
|
|
+ struct mlme_info mlme_info = {0};
|
|
|
|
+ struct bss_info bss_info = {0};
|
|
|
|
+
|
|
|
|
+ /* Update scan entry in case connect is success or fails with bssid */
|
|
|
|
+ if (qdf_is_macaddr_zero(&resp->bssid))
|
|
|
|
+ goto update_standby;
|
|
|
|
+
|
|
|
|
+ if (QDF_IS_STATUS_SUCCESS(resp->connect_status))
|
|
|
|
+ mlme_info.assoc_state = SCAN_ENTRY_CON_STATE_ASSOC;
|
|
|
|
+ else
|
|
|
|
+ mlme_info.assoc_state = SCAN_ENTRY_CON_STATE_NONE;
|
|
|
|
+
|
|
|
|
+ qdf_copy_macaddr(&bss_info.bssid, &resp->bssid);
|
|
|
|
+ bss_info.freq = resp->freq;
|
|
|
|
+
|
|
|
|
+ bss_info.ssid.length = resp->ssid.length;
|
|
|
|
+ qdf_mem_copy(&bss_info.ssid.ssid, resp->ssid.ssid,
|
|
|
|
+ bss_info.ssid.length);
|
|
|
|
+
|
|
|
|
+ wlan_scan_update_mlme_by_bssinfo(
|
|
|
|
+ wlan_vdev_get_pdev(cm_ctx->vdev),
|
|
|
|
+ &bss_info, &mlme_info);
|
|
|
|
+ cm_update_link_channel_info(cm_ctx->vdev, &resp->bssid,
|
|
|
|
+ resp->freq);
|
|
|
|
+
|
|
|
|
+update_standby:
|
|
|
|
+ cm_standby_link_update_mlme_by_bssid(cm_ctx->vdev,
|
|
|
|
+ mlme_info.assoc_state,
|
|
|
|
+ resp->ssid);
|
|
|
|
+}
|
|
|
|
+
|
|
QDF_STATUS cm_connect_complete(struct cnx_mgr *cm_ctx,
|
|
QDF_STATUS cm_connect_complete(struct cnx_mgr *cm_ctx,
|
|
struct wlan_cm_connect_resp *resp)
|
|
struct wlan_cm_connect_resp *resp)
|
|
{
|
|
{
|
|
enum wlan_cm_sm_state sm_state;
|
|
enum wlan_cm_sm_state sm_state;
|
|
- struct bss_info bss_info;
|
|
|
|
- struct mlme_info mlme_info = {0};
|
|
|
|
bool send_ind = true;
|
|
bool send_ind = true;
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -3096,27 +3148,8 @@ QDF_STATUS cm_connect_complete(struct cnx_mgr *cm_ctx,
|
|
if (send_ind)
|
|
if (send_ind)
|
|
cm_notify_connect_complete(cm_ctx, resp, 1);
|
|
cm_notify_connect_complete(cm_ctx, resp, 1);
|
|
|
|
|
|
- /* Update scan entry in case connect is success or fails with bssid */
|
|
|
|
- if (!qdf_is_macaddr_zero(&resp->bssid)) {
|
|
|
|
- if (QDF_IS_STATUS_SUCCESS(resp->connect_status))
|
|
|
|
- mlme_info.assoc_state = SCAN_ENTRY_CON_STATE_ASSOC;
|
|
|
|
- else
|
|
|
|
- mlme_info.assoc_state = SCAN_ENTRY_CON_STATE_NONE;
|
|
|
|
- qdf_copy_macaddr(&bss_info.bssid, &resp->bssid);
|
|
|
|
- bss_info.freq = resp->freq;
|
|
|
|
- bss_info.ssid.length = resp->ssid.length;
|
|
|
|
- qdf_mem_copy(&bss_info.ssid.ssid, resp->ssid.ssid,
|
|
|
|
- bss_info.ssid.length);
|
|
|
|
- wlan_scan_update_mlme_by_bssinfo(
|
|
|
|
- wlan_vdev_get_pdev(cm_ctx->vdev),
|
|
|
|
- &bss_info, &mlme_info);
|
|
|
|
- cm_update_link_channel_info(cm_ctx->vdev, &resp->bssid,
|
|
|
|
- resp->freq);
|
|
|
|
- }
|
|
|
|
|
|
|
|
- cm_standby_link_update_mlme_by_bssid(cm_ctx->vdev,
|
|
|
|
- mlme_info.assoc_state,
|
|
|
|
- resp->ssid);
|
|
|
|
|
|
+ cm_update_scan_mlme_info(cm_ctx, resp);
|
|
|
|
|
|
mlme_debug(CM_PREFIX_FMT,
|
|
mlme_debug(CM_PREFIX_FMT,
|
|
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev),
|
|
CM_PREFIX_REF(wlan_vdev_get_id(cm_ctx->vdev),
|