Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e202ef05 authored by Ajit Vaishya's avatar Ajit Vaishya Committed by Gerrit - the friendly Code Review server
Browse files

wlan: Add Support to configure blacklist age out time

This changes provides new ini parameter i.e.
gBssidBlacklistTimeOut to configured blacklist timer
to firmware in Minutes or default timedout value.
Once Bssid enter into blacklist table, till timedout
expired particular BSSID won't be found as part of
PNO scan result.

Change-Id: I53f3bd4b81be04e62b99a72e64de4b200a3b7d8e
CRs-Fixed: 2674289
parent 4b922079
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -886,6 +886,11 @@ typedef enum
#define CFG_LFR_MAWC_FEATURE_ENABLED_MIN                    (0)
#define CFG_LFR_MAWC_FEATURE_ENABLED_MAX                    (1)
#define CFG_LFR_MAWC_FEATURE_ENABLED_DEFAULT                (0) /* disabled */

#define CFG_PER_BSSID_BLACKLIST_TIMEOUT_NAME               "gBssidBlacklistTimeOut"
#define CFG_PER_BSSID_BLACKLIST_TIMEOUT_MIN                (0)
#define CFG_PER_BSSID_BLACKLIST_TIMEOUT_MAX                (240) //Max timeout
#define CFG_PER_BSSID_BLACKLIST_TIMEOUT_DEFAULT            (10)
#endif // FEATURE_WLAN_LFR

#if  defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
@@ -3908,6 +3913,9 @@ typedef struct
#ifdef WLAN_FEATURE_SAE
   bool                        is_sae_enabled;
#endif
#ifdef FEATURE_WLAN_LFR
   uint8_t                     bssid_blacklist_timeout;
#endif
} hdd_config_t;

/*--------------------------------------------------------------------------- 
+8 −0
Original line number Diff line number Diff line
@@ -1109,6 +1109,14 @@ REG_TABLE_ENTRY g_registry_table[] =
                 CFG_LFR_MAWC_FEATURE_ENABLED_MAX,
                 NotifyIsMAWCIniFeatureEnabled, 0 ),

   /* flag to turn ON/OFF Motion assistance for Legacy Fast Roaming */
   REG_VARIABLE( CFG_PER_BSSID_BLACKLIST_TIMEOUT_NAME, WLAN_PARAM_Integer,
                 hdd_config_t, bssid_blacklist_timeout,
                 VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
                 CFG_PER_BSSID_BLACKLIST_TIMEOUT_DEFAULT,
                 CFG_PER_BSSID_BLACKLIST_TIMEOUT_MIN,
                 CFG_PER_BSSID_BLACKLIST_TIMEOUT_MAX ),

#endif // FEATURE_WLAN_LFR

#if  defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
+8 −3
Original line number Diff line number Diff line
@@ -6773,12 +6773,14 @@ wlan_hdd_set_roam_param_policy[MAX_ROAMING_PARAM + 1] = {
/**
 * hdd_set_blacklist_bssid() - parse set blacklist bssid
 * @hHal:       HAL Handle
 * @blacklist_timeout:   Per Bssid Blacklist timer
 * @tb:            list of attributes
 * @session_id:    session id
 *
 * Return: 0 on success; error number on failure
 */
static int hdd_set_blacklist_bssid(tHalHandle hHal,
                                   uint8_t blacklist_timeout,
                                   struct nlattr **tb,
                                   uint8_t session_id)
{
@@ -6806,7 +6808,7 @@ static int hdd_set_blacklist_bssid(tHalHandle hHal,
        goto fail;
    }
    roam_params->blacklist_timedout = 0;
    roam_params->blacklist_timedout =  blacklist_timeout;
    hddLog(LOG1, FL("Num of blacklist BSSID (%d)"), count);
    i = 0;
@@ -6844,7 +6846,7 @@ static int hdd_set_blacklist_bssid(tHalHandle hHal,
               i, count);
    roam_params->num_bssid_avoid_list = i;
    hddLog(LOG1, FL("session  id %d "), session_id);
    hddLog(LOG1, FL("session  id %d timer %d"), session_id, blacklist_timeout);
    if (sme_UpdateBlacklist(hHal, session_id, roam_params) !=
       eHAL_STATUS_SUCCESS) {
       goto fail;
@@ -6882,6 +6884,7 @@ __wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy,
    uint32_t cmd_type, req_id;
    struct nlattr *tb_vendor[MAX_ROAMING_PARAM + 1];
    int ret = 0;
    uint8_t blacklist_timeout = 0;
    ENTER();
@@ -6907,6 +6910,8 @@ __wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy,
        return -EINVAL;
    }
    blacklist_timeout = hdd_ctx->cfg_ini->bssid_blacklist_timeout;
    cmd_type = nla_get_u32(tb_vendor[QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD]);
    if (!tb_vendor[QCA_WLAN_VENDOR_ATTR_ROAMING_REQ_ID]) {
        hddLog(LOGE, FL("attr request id failed"));
@@ -6918,7 +6923,7 @@ __wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy,
    switch (cmd_type) {
    case QCA_WLAN_VENDOR_ROAMING_SUBCMD_SET_BLACKLIST_BSSID:
         ret = hdd_set_blacklist_bssid(hHal,
         ret = hdd_set_blacklist_bssid(hHal, blacklist_timeout,
                   tb_vendor, pAdapter->sessionId);
         if (ret)
             return ret;
+3 −0
Original line number Diff line number Diff line
@@ -523,6 +523,9 @@ gMDNSResponseTypeSRVPriority=0
# mDNS response typeSRVWeight
gMDNSResponseTypeSRVWeight=0

#Blacklist Bssid Timer in Min
# MAX: 240,  MIN: 0
gBssidBlacklistTimeout=10
END

# Note: Configuration parser would not read anything past the END marker