qcacmn: Add API to get self link id of scan entry

Introduce APIs to fetch the self IEEE link id of the scan entry
and also add new fields to scan filter to enable filtering
entries matching the link id.

Change-Id: I5da8592dc60dbca4734601d746a1137655ee0b34
CRs-Fixed: 3843567
This commit is contained in:
Vinod Kumar Pirla
2024-06-17 10:09:09 -07:00
committed by Ravindra Konda
szülő 31bcad1b28
commit be01ca837a
5 fájl változott, egészen pontosan 41 új sor hozzáadva és 3 régi sor törölve

Fájl megtekintése

@@ -233,6 +233,8 @@ enum wlan_cm_source {
* @vht_caps_mask: mask of valid vht caps * @vht_caps_mask: mask of valid vht caps
* @fils_info: Fills related connect info * @fils_info: Fills related connect info
* @is_non_assoc_link: non assoc link * @is_non_assoc_link: non assoc link
* @link_id: IEEE link ID of the candidate
* -mandatory and only used for link VDEV connect
* @mld_addr: MLD address of candidate * @mld_addr: MLD address of candidate
* -mandatory and only used for link VDEV connect * -mandatory and only used for link VDEV connect
* @ml_parnter_info: ml partner link info * @ml_parnter_info: ml partner link info
@@ -264,6 +266,7 @@ struct wlan_cm_connect_req {
#endif #endif
bool is_non_assoc_link; bool is_non_assoc_link;
#ifdef WLAN_FEATURE_11BE_MLO #ifdef WLAN_FEATURE_11BE_MLO
uint8_t link_id;
struct qdf_mac_addr mld_addr; struct qdf_mac_addr mld_addr;
struct mlo_partner_info ml_parnter_info; struct mlo_partner_info ml_parnter_info;
#endif #endif

Fájl megtekintése

@@ -721,6 +721,15 @@ static bool scm_mlo_filter_match(struct wlan_objmgr_pdev *pdev,
} }
} }
if (filter->match_link_id && filter->link_id != WLAN_INVALID_LINK_ID &&
filter->link_id != util_scan_entry_self_linkid(db_entry)) {
scm_debug(QDF_MAC_ADDR_FMT " link id %d mismatch filter link id %d",
QDF_MAC_ADDR_REF(db_entry->bssid.bytes),
util_scan_entry_self_linkid(db_entry),
filter->link_id);
return false;
}
if (!db_entry->ie_list.multi_link_bv) if (!db_entry->ie_list.multi_link_bv)
return true; return true;
if (!filter->band_bitmap) if (!filter->band_bitmap)

Fájl megtekintése

@@ -741,6 +741,7 @@ enum dot11_mode_filter {
* @ignore_nol_chan: Ignore entry with channel in the NOL list * @ignore_nol_chan: Ignore entry with channel in the NOL list
* @ignore_6ghz_channel: ignore 6Ghz channels * @ignore_6ghz_channel: ignore 6Ghz channels
* @match_mld_addr: Flag to match mld addr of scan entry * @match_mld_addr: Flag to match mld addr of scan entry
* @match_link_id: Flag to match self IEEE link id of scan entry
* @age_threshold: If set return entry which are newer than the age_threshold * @age_threshold: If set return entry which are newer than the age_threshold
* @num_of_bssid: number of bssid passed * @num_of_bssid: number of bssid passed
* @num_of_ssid: number of ssid * @num_of_ssid: number of ssid
@@ -766,6 +767,7 @@ enum dot11_mode_filter {
* @ccx_validate_bss: Function pointer to custom bssid filter * @ccx_validate_bss: Function pointer to custom bssid filter
* @ccx_validate_bss_arg: Function argument to custom bssid filter * @ccx_validate_bss_arg: Function argument to custom bssid filter
* @band_bitmap: Allowed band bit map, BIT0: 2G, BIT1: 5G, BIT2: 6G * @band_bitmap: Allowed band bit map, BIT0: 2G, BIT1: 5G, BIT2: 6G
* @link_id: IEEE link ID to match if @match_link_id is set to %true
* @mld_addr: MLD addr to match if @match_mld_addr is set to true. * @mld_addr: MLD addr to match if @match_mld_addr is set to true.
*/ */
struct scan_filter { struct scan_filter {
@@ -775,7 +777,8 @@ struct scan_filter {
ignore_auth_enc_type:1, ignore_auth_enc_type:1,
ignore_nol_chan:1, ignore_nol_chan:1,
ignore_6ghz_channel:1, ignore_6ghz_channel:1,
match_mld_addr:1; match_mld_addr:1,
match_link_id:1;
qdf_time_t age_threshold; qdf_time_t age_threshold;
uint8_t num_of_bssid; uint8_t num_of_bssid;
uint8_t num_of_ssid; uint8_t num_of_ssid;
@@ -804,6 +807,7 @@ struct scan_filter {
bss_filter_arg_t ccx_validate_bss_arg; bss_filter_arg_t ccx_validate_bss_arg;
#ifdef WLAN_FEATURE_11BE_MLO #ifdef WLAN_FEATURE_11BE_MLO
uint32_t band_bitmap; uint32_t band_bitmap;
uint8_t link_id;
struct qdf_mac_addr mld_addr; struct qdf_mac_addr mld_addr;
#endif #endif
}; };

Fájl megtekintése

@@ -141,12 +141,32 @@ util_scan_entry_mldaddr(struct scan_cache_entry *scan_entry)
return mld_addr; return mld_addr;
} }
/**
* util_scan_entry_self_linkid() - Function to get self IEEE link id
* @scan_entry: scan entry
*
* API will return self IEEE link ID
*
* Return: Value of self IEEE link ID
*/
static inline uint8_t
util_scan_entry_self_linkid(struct scan_cache_entry *scan_entry)
{
return scan_entry->ml_info.self_link_id;
}
#else #else
static inline struct qdf_mac_addr * static inline struct qdf_mac_addr *
util_scan_entry_mldaddr(struct scan_cache_entry *scan_entry) util_scan_entry_mldaddr(struct scan_cache_entry *scan_entry)
{ {
return NULL; return NULL;
} }
static inline uint8_t
util_scan_entry_self_linkid(struct scan_cache_entry *scan_entry)
{
return WLAN_INVALID_LINK_ID;
}
#endif #endif
/** /**

Fájl megtekintése

@@ -2386,6 +2386,8 @@ static void util_scan_update_ml_info(struct wlan_objmgr_pdev *pdev,
bool is_ml_ie_valid = true; bool is_ml_ie_valid = true;
uint8_t *end_ptr = NULL; uint8_t *end_ptr = NULL;
scan_entry->ml_info.self_link_id = WLAN_INVALID_LINK_ID;
if (!scan_entry->ie_list.ehtcap && scan_entry->ie_list.multi_link_bv) { if (!scan_entry->ie_list.ehtcap && scan_entry->ie_list.multi_link_bv) {
scan_entry->ie_list.multi_link_bv = NULL; scan_entry->ie_list.multi_link_bv = NULL;
return; return;
@@ -2431,8 +2433,8 @@ static void util_scan_update_ml_info(struct wlan_objmgr_pdev *pdev,
util_get_ml_bv_partner_link_info(pdev, scan_entry); util_get_ml_bv_partner_link_info(pdev, scan_entry);
} }
#else #else
static void util_scan_update_ml_info(struct wlan_objmgr_pdev *pdev, static inline void util_scan_update_ml_info(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *scan_entry) struct scan_cache_entry *scan_entry)
{ {
} }
#endif #endif