|
@@ -7105,3 +7105,147 @@ const char *lim_bss_type_to_string(const uint16_t bss_type)
|
|
|
return "Unknown bss_type";
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * lim_init_obss_params(): Initializes the OBSS Scan Parameters
|
|
|
+ * @sesssion: LIM session
|
|
|
+ * @mac_ctx: Mac context
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+void lim_init_obss_params(tpAniSirGlobal mac_ctx, tpPESession session)
|
|
|
+{
|
|
|
+ uint32_t cfg_value;
|
|
|
+
|
|
|
+ if (wlan_cfg_get_int(mac_ctx, WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME,
|
|
|
+ &cfg_value) != eSIR_SUCCESS) {
|
|
|
+ lim_log(mac_ctx, LOGE,
|
|
|
+ FL("Fail to retrieve %x value"),
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ session->obss_ht40_scanparam.obss_active_dwelltime = cfg_value;
|
|
|
+
|
|
|
+ if (wlan_cfg_get_int(mac_ctx, WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME,
|
|
|
+ &cfg_value) != eSIR_SUCCESS) {
|
|
|
+ lim_log(mac_ctx, LOGE,
|
|
|
+ FL("Fail to retrieve %x value"),
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ session->obss_ht40_scanparam.obss_passive_dwelltime = cfg_value;
|
|
|
+
|
|
|
+ if (wlan_cfg_get_int(mac_ctx,
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL,
|
|
|
+ &cfg_value) != eSIR_SUCCESS) {
|
|
|
+ lim_log(mac_ctx, LOGE,
|
|
|
+ FL("Fail to retrieve %x value"),
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ session->obss_ht40_scanparam.obss_width_trigger_interval = cfg_value;
|
|
|
+ if (wlan_cfg_get_int(mac_ctx,
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL,
|
|
|
+ &cfg_value) != eSIR_SUCCESS) {
|
|
|
+ lim_log(mac_ctx, LOGE,
|
|
|
+ FL("Fail to retrieve %x value"),
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ session->obss_ht40_scanparam.obss_active_total_per_channel = cfg_value;
|
|
|
+ if (wlan_cfg_get_int(mac_ctx,
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL, &cfg_value)
|
|
|
+ != eSIR_SUCCESS) {
|
|
|
+ lim_log(mac_ctx, LOGE,
|
|
|
+ FL("Fail to retrieve %x value"),
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ session->obss_ht40_scanparam.obss_passive_total_per_channel = cfg_value;
|
|
|
+
|
|
|
+ if (wlan_cfg_get_int(mac_ctx,
|
|
|
+ WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY, &cfg_value)
|
|
|
+ != eSIR_SUCCESS) {
|
|
|
+ lim_log(mac_ctx, LOGE,
|
|
|
+ FL("Fail to retrieve %x value"),
|
|
|
+ WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ session->obss_ht40_scanparam.bsswidth_ch_trans_delay =
|
|
|
+ cfg_value;
|
|
|
+
|
|
|
+ if (wlan_cfg_get_int(mac_ctx, WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD,
|
|
|
+ &cfg_value) != eSIR_SUCCESS) {
|
|
|
+ lim_log(mac_ctx, LOGE,
|
|
|
+ FL("Fail to retrieve %x value"),
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ session->obss_ht40_scanparam.obss_activity_threshold = cfg_value;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * lim_update_obss_scanparams(): Updates OBSS SCAN IE parameters to session
|
|
|
+ * @sesssion: LIM session
|
|
|
+ * @scan_params: Scan parameters
|
|
|
+ *
|
|
|
+ * Return: None
|
|
|
+ */
|
|
|
+void lim_update_obss_scanparams(tpPESession session,
|
|
|
+ tDot11fIEOBSSScanParameters *scan_params)
|
|
|
+{
|
|
|
+ /*
|
|
|
+ * If the recieved value is not in the range specified
|
|
|
+ * by the Specification then it will be the default value
|
|
|
+ * configured through cfg
|
|
|
+ */
|
|
|
+ if ((scan_params->obssScanActiveDwell >
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMIN) &&
|
|
|
+ (scan_params->obssScanActiveDwell <
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME_STAMAX))
|
|
|
+ session->obss_ht40_scanparam.obss_active_dwelltime =
|
|
|
+ scan_params->obssScanActiveDwell;
|
|
|
+
|
|
|
+ if ((scan_params->obssScanPassiveDwell >
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMIN) &&
|
|
|
+ (scan_params->obssScanPassiveDwell <
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME_STAMAX))
|
|
|
+ session->obss_ht40_scanparam.obss_active_dwelltime =
|
|
|
+ scan_params->obssScanPassiveDwell;
|
|
|
+
|
|
|
+ if ((scan_params->bssWidthChannelTransitionDelayFactor >
|
|
|
+ WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMIN) &&
|
|
|
+ (scan_params->bssWidthChannelTransitionDelayFactor <
|
|
|
+ WNI_CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY_STAMAX))
|
|
|
+ session->obss_ht40_scanparam.bsswidth_ch_trans_delay =
|
|
|
+ scan_params->bssWidthChannelTransitionDelayFactor;
|
|
|
+
|
|
|
+ if ((scan_params->obssScanActiveTotalPerChannel >
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMIN) &&
|
|
|
+ (scan_params->obssScanActiveTotalPerChannel <
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL_STAMAX))
|
|
|
+ session->obss_ht40_scanparam.obss_active_total_per_channel =
|
|
|
+ scan_params->obssScanActiveTotalPerChannel;
|
|
|
+
|
|
|
+ if ((scan_params->obssScanPassiveTotalPerChannel >
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMIN) &&
|
|
|
+ (scan_params->obssScanPassiveTotalPerChannel <
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL_STAMAX))
|
|
|
+ session->obss_ht40_scanparam.obss_passive_total_per_channel =
|
|
|
+ scan_params->obssScanPassiveTotalPerChannel;
|
|
|
+
|
|
|
+ if ((scan_params->bssChannelWidthTriggerScanInterval >
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMIN) &&
|
|
|
+ (scan_params->bssChannelWidthTriggerScanInterval <
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL_STAMAX))
|
|
|
+ session->obss_ht40_scanparam.obss_width_trigger_interval =
|
|
|
+ scan_params->bssChannelWidthTriggerScanInterval;
|
|
|
+
|
|
|
+ if ((scan_params->obssScanActivityThreshold >
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMIN) &&
|
|
|
+ (scan_params->obssScanActivityThreshold <
|
|
|
+ WNI_CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD_STAMAX))
|
|
|
+ session->obss_ht40_scanparam.obss_activity_threshold =
|
|
|
+ scan_params->obssScanActivityThreshold;
|
|
|
+ return;
|
|
|
+}
|