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
committad av Ravindra Konda
förälder 31bcad1b28
incheckning be01ca837a
5 ändrade filer med 41 tillägg och 3 borttagningar

Visa fil

@@ -233,6 +233,8 @@ enum wlan_cm_source {
* @vht_caps_mask: mask of valid vht caps
* @fils_info: Fills related connect info
* @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
* -mandatory and only used for link VDEV connect
* @ml_parnter_info: ml partner link info
@@ -264,6 +266,7 @@ struct wlan_cm_connect_req {
#endif
bool is_non_assoc_link;
#ifdef WLAN_FEATURE_11BE_MLO
uint8_t link_id;
struct qdf_mac_addr mld_addr;
struct mlo_partner_info ml_parnter_info;
#endif

Visa fil

@@ -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)
return true;
if (!filter->band_bitmap)

Visa fil

@@ -741,6 +741,7 @@ enum dot11_mode_filter {
* @ignore_nol_chan: Ignore entry with channel in the NOL list
* @ignore_6ghz_channel: ignore 6Ghz channels
* @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
* @num_of_bssid: number of bssid passed
* @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_arg: Function argument to custom bssid filter
* @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.
*/
struct scan_filter {
@@ -775,7 +777,8 @@ struct scan_filter {
ignore_auth_enc_type:1,
ignore_nol_chan:1,
ignore_6ghz_channel:1,
match_mld_addr:1;
match_mld_addr:1,
match_link_id:1;
qdf_time_t age_threshold;
uint8_t num_of_bssid;
uint8_t num_of_ssid;
@@ -804,6 +807,7 @@ struct scan_filter {
bss_filter_arg_t ccx_validate_bss_arg;
#ifdef WLAN_FEATURE_11BE_MLO
uint32_t band_bitmap;
uint8_t link_id;
struct qdf_mac_addr mld_addr;
#endif
};

Visa fil

@@ -141,12 +141,32 @@ util_scan_entry_mldaddr(struct scan_cache_entry *scan_entry)
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
static inline struct qdf_mac_addr *
util_scan_entry_mldaddr(struct scan_cache_entry *scan_entry)
{
return NULL;
}
static inline uint8_t
util_scan_entry_self_linkid(struct scan_cache_entry *scan_entry)
{
return WLAN_INVALID_LINK_ID;
}
#endif
/**

Visa fil

@@ -2386,6 +2386,8 @@ static void util_scan_update_ml_info(struct wlan_objmgr_pdev *pdev,
bool is_ml_ie_valid = true;
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) {
scan_entry->ie_list.multi_link_bv = NULL;
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);
}
#else
static void util_scan_update_ml_info(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *scan_entry)
static inline void util_scan_update_ml_info(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *scan_entry)
{
}
#endif