mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Utilize wlan_is_ie_valid()
In change "qcacld-3.0: Validate Scan Default IEs" in the qcacld-3.0 project (Change-Id: Ifd8739c96a9990f01ff159eb59a7e904f7b8c592) the utility API hdd_is_ie_valid() was introduced. One review comments was that this should be a converged API. Subsequently change "qcacmn: Introduce wlan_is_ie_valid()" in the qcacmn project (Change-Id: I8d2a520ea70645ab54b450de83452c0035653485) created the converged API wlan_is_ie_valid(), so now remove hdd_is_ie_valid() and instead use wlan_is_ie_valid(). Change-Id: I60fcba09e9c962b7891315cea0e273db88a3d49d CRs-Fixed: 2170493
This commit is contained in:
parent
929c793dc1
commit
4933c3a290
2 changed files with 1 additions and 37 deletions
|
|
@ -668,27 +668,6 @@ static const struct wiphy_wowlan_support wowlan_support_cfg80211_init = {
|
|||
};
|
||||
#endif
|
||||
|
||||
bool hdd_is_ie_valid(const uint8_t *ie, size_t ie_len)
|
||||
{
|
||||
uint8_t elen;
|
||||
|
||||
while (ie_len) {
|
||||
if (ie_len < 2)
|
||||
return false;
|
||||
|
||||
elen = ie[1];
|
||||
ie_len -= 2;
|
||||
ie += 2;
|
||||
if (elen > ie_len)
|
||||
return false;
|
||||
|
||||
ie_len -= elen;
|
||||
ie += elen;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_add_channel_switch_support()- Adds Channel Switch flag if supported
|
||||
* @flags: Pointer to the flags to Add channel switch flag.
|
||||
|
|
@ -6588,7 +6567,7 @@ static int hdd_config_scan_default_ies(struct hdd_adapter *adapter,
|
|||
}
|
||||
|
||||
scan_ie = nla_data(attr);
|
||||
if (!hdd_is_ie_valid(scan_ie, scan_ie_len)) {
|
||||
if (!wlan_is_ie_valid(scan_ie, scan_ie_len)) {
|
||||
hdd_err("Invalid default scan IEs");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,21 +223,6 @@ typedef enum {
|
|||
#define CFG_PROPAGATION_DELAY_BASE (64)
|
||||
#define CFG_AGG_RETRY_MIN (5)
|
||||
|
||||
/**
|
||||
* hdd_is_ie_valid() - Determine if an IE sequence is valid
|
||||
* @ie: Pointer to the IE buffer
|
||||
* @ie_len: Length of the IE buffer @ie
|
||||
*
|
||||
* This function validates that the IE sequence is valid by verifying
|
||||
* that the sum of the lengths of the embedded elements match the
|
||||
* length of the sequence.
|
||||
*
|
||||
* Note well that a 0-length IE sequence is considered valid.
|
||||
*
|
||||
* Return: true if the IE sequence is valid, false if it is invalid
|
||||
*/
|
||||
bool hdd_is_ie_valid(const uint8_t *ie, size_t ie_len);
|
||||
|
||||
struct cfg80211_bss *
|
||||
wlan_hdd_cfg80211_update_bss_db(struct hdd_adapter *adapter,
|
||||
struct csr_roam_info *roam_info);
|
||||
|
|
|
|||
Loading…
Reference in a new issue