qcacmn: Add security info in scan entry
Add security info in scan entry and print the same. Change-Id: If8f0c05a526b86cb3ae0020c2e144beb3510cb98 CRs-Fixed: 2603004
This commit is contained in:
@@ -850,6 +850,7 @@ static QDF_STATUS scm_add_update_entry(struct wlan_objmgr_psoc *psoc,
|
|||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
struct scan_dbs *scan_db;
|
struct scan_dbs *scan_db;
|
||||||
struct wlan_scan_obj *scan_obj;
|
struct wlan_scan_obj *scan_obj;
|
||||||
|
uint8_t security_type;
|
||||||
|
|
||||||
scan_db = wlan_pdev_get_scan_db(psoc, pdev);
|
scan_db = wlan_pdev_get_scan_db(psoc, pdev);
|
||||||
if (!scan_db) {
|
if (!scan_db) {
|
||||||
@@ -878,7 +879,8 @@ static QDF_STATUS scm_add_update_entry(struct wlan_objmgr_psoc *psoc,
|
|||||||
is_dup_found = scm_find_duplicate(pdev, scan_obj, scan_db, scan_params,
|
is_dup_found = scm_find_duplicate(pdev, scan_obj, scan_db, scan_params,
|
||||||
&dup_node);
|
&dup_node);
|
||||||
|
|
||||||
scm_nofl_debug("Received %s: BSSID: %pM tsf_delta %u Seq %d ssid: %.*s rssi: %d snr %d freq %d phy_mode %d hidden %d chan_mismatch %d pdev %d",
|
security_type = scan_params->security_type;
|
||||||
|
scm_nofl_debug("Received %s: BSSID: %pM tsf_delta %u Seq %d ssid: %.*s rssi: %d snr %d freq %d phy_mode %d hidden %d chan_mismatch %d %s%s%s%s pdev %d",
|
||||||
(scan_params->frm_subtype == MGMT_SUBTYPE_PROBE_RESP) ?
|
(scan_params->frm_subtype == MGMT_SUBTYPE_PROBE_RESP) ?
|
||||||
"Probe Rsp" : "Beacon", scan_params->bssid.bytes,
|
"Probe Rsp" : "Beacon", scan_params->bssid.bytes,
|
||||||
scan_params->tsf_delta, scan_params->seq_num,
|
scan_params->tsf_delta, scan_params->seq_num,
|
||||||
@@ -887,6 +889,10 @@ static QDF_STATUS scm_add_update_entry(struct wlan_objmgr_psoc *psoc,
|
|||||||
scan_params->channel.chan_freq, scan_params->phy_mode,
|
scan_params->channel.chan_freq, scan_params->phy_mode,
|
||||||
scan_params->is_hidden_ssid,
|
scan_params->is_hidden_ssid,
|
||||||
scan_params->channel_mismatch,
|
scan_params->channel_mismatch,
|
||||||
|
security_type & SCAN_SECURITY_TYPE_WPA ? "[WPA]" : "",
|
||||||
|
security_type & SCAN_SECURITY_TYPE_RSN ? "[RSN]" : "",
|
||||||
|
security_type & SCAN_SECURITY_TYPE_WAPI ? "[WAPI]" : "",
|
||||||
|
security_type & SCAN_SECURITY_TYPE_WEP ? "[WEP]" : "",
|
||||||
wlan_objmgr_pdev_get_pdev_id(pdev));
|
wlan_objmgr_pdev_get_pdev_id(pdev));
|
||||||
|
|
||||||
if (scan_obj->cb.inform_beacon)
|
if (scan_obj->cb.inform_beacon)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -359,6 +359,11 @@ struct reduced_neighbor_report {
|
|||||||
struct rnr_bss_info bss_info[MAX_RNR_BSS];
|
struct rnr_bss_info bss_info[MAX_RNR_BSS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define SCAN_SECURITY_TYPE_WEP 0x01
|
||||||
|
#define SCAN_SECURITY_TYPE_WPA 0x02
|
||||||
|
#define SCAN_SECURITY_TYPE_WAPI 0x04
|
||||||
|
#define SCAN_SECURITY_TYPE_RSN 0x08
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* struct scan_cache_entry: structure containing scan entry
|
* struct scan_cache_entry: structure containing scan entry
|
||||||
* @frm_subtype: updated from beacon/probe
|
* @frm_subtype: updated from beacon/probe
|
||||||
@@ -366,6 +371,7 @@ struct reduced_neighbor_report {
|
|||||||
* @mac_addr: mac address
|
* @mac_addr: mac address
|
||||||
* @ssid: ssid
|
* @ssid: ssid
|
||||||
* @is_hidden_ssid: is AP having hidden ssid.
|
* @is_hidden_ssid: is AP having hidden ssid.
|
||||||
|
* @security_type: security supported
|
||||||
* @seq_num: sequence number
|
* @seq_num: sequence number
|
||||||
* @phy_mode: Phy mode of the AP
|
* @phy_mode: Phy mode of the AP
|
||||||
* @avg_rssi: Average RSSI of the AP
|
* @avg_rssi: Average RSSI of the AP
|
||||||
@@ -409,6 +415,7 @@ struct scan_cache_entry {
|
|||||||
struct qdf_mac_addr mac_addr;
|
struct qdf_mac_addr mac_addr;
|
||||||
struct wlan_ssid ssid;
|
struct wlan_ssid ssid;
|
||||||
bool is_hidden_ssid;
|
bool is_hidden_ssid;
|
||||||
|
uint8_t security_type;
|
||||||
uint16_t seq_num;
|
uint16_t seq_num;
|
||||||
enum wlan_phymode phy_mode;
|
enum wlan_phymode phy_mode;
|
||||||
int32_t avg_rssi;
|
int32_t avg_rssi;
|
||||||
|
@@ -1371,6 +1371,21 @@ static void scm_fill_adaptive_11r_cap(struct scan_cache_entry *scan_entry)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static void util_scan_set_security(struct scan_cache_entry *scan_params)
|
||||||
|
{
|
||||||
|
if (util_scan_entry_wpa(scan_params))
|
||||||
|
scan_params->security_type |= SCAN_SECURITY_TYPE_WPA;
|
||||||
|
|
||||||
|
if (util_scan_entry_rsn(scan_params))
|
||||||
|
scan_params->security_type |= SCAN_SECURITY_TYPE_RSN;
|
||||||
|
if (util_scan_entry_wapi(scan_params))
|
||||||
|
scan_params->security_type |= SCAN_SECURITY_TYPE_WAPI;
|
||||||
|
|
||||||
|
if (!scan_params->security_type &&
|
||||||
|
scan_params->cap_info.wlan_caps.privacy)
|
||||||
|
scan_params->security_type |= SCAN_SECURITY_TYPE_WEP;
|
||||||
|
}
|
||||||
|
|
||||||
static QDF_STATUS
|
static QDF_STATUS
|
||||||
util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
|
util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
|
||||||
uint8_t *frame, qdf_size_t frame_len,
|
uint8_t *frame, qdf_size_t frame_len,
|
||||||
@@ -1521,6 +1536,7 @@ util_scan_gen_scan_entry(struct wlan_objmgr_pdev *pdev,
|
|||||||
|
|
||||||
scan_entry->nss = util_scan_scm_calc_nss_supported_by_ap(scan_entry);
|
scan_entry->nss = util_scan_scm_calc_nss_supported_by_ap(scan_entry);
|
||||||
scm_fill_adaptive_11r_cap(scan_entry);
|
scm_fill_adaptive_11r_cap(scan_entry);
|
||||||
|
util_scan_set_security(scan_entry);
|
||||||
|
|
||||||
util_scan_scm_update_bss_with_esp_data(scan_entry);
|
util_scan_scm_update_bss_with_esp_data(scan_entry);
|
||||||
qbss_load = (struct qbss_load_ie *)
|
qbss_load = (struct qbss_load_ie *)
|
||||||
|
Reference in New Issue
Block a user