|
@@ -322,6 +322,28 @@ void wlan_hdd_cfg80211_scan_block_cb(struct work_struct *work)
|
|
|
cds_ssr_unprotect(__func__);
|
|
|
}
|
|
|
|
|
|
+void hdd_init_scan_reject_params(struct hdd_context *hdd_ctx)
|
|
|
+{
|
|
|
+ if (hdd_ctx) {
|
|
|
+ hdd_ctx->last_scan_reject_timestamp = 0;
|
|
|
+ hdd_ctx->last_scan_reject_session_id = 0xFF;
|
|
|
+ hdd_ctx->last_scan_reject_reason = 0;
|
|
|
+ hdd_ctx->scan_reject_cnt = 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+void hdd_reset_scan_reject_params(struct hdd_context *hdd_ctx,
|
|
|
+ eRoamCmdStatus roam_status,
|
|
|
+ eCsrRoamResult roam_result)
|
|
|
+{
|
|
|
+ if ((roam_status == eCSR_ROAM_ASSOCIATION_FAILURE) ||
|
|
|
+ (roam_status == eCSR_ROAM_CANCELLED) ||
|
|
|
+ (roam_result == eCSR_ROAM_RESULT_ASSOCIATED)) {
|
|
|
+ hdd_debug("Reset scan reject params");
|
|
|
+ hdd_init_scan_reject_params(hdd_ctx);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* wlan_hdd_update_scan_ies() - API to update the scan IEs of scan request
|
|
|
* with already stored default scan IEs
|
|
@@ -594,10 +616,8 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|
|
}
|
|
|
return -EBUSY;
|
|
|
}
|
|
|
- hdd_ctx->last_scan_reject_timestamp = 0;
|
|
|
- hdd_ctx->last_scan_reject_session_id = 0xFF;
|
|
|
- hdd_ctx->last_scan_reject_reason = 0;
|
|
|
- hdd_ctx->scan_reject_cnt = 0;
|
|
|
+
|
|
|
+ hdd_init_scan_reject_params(hdd_ctx);
|
|
|
|
|
|
/* Check whether SAP scan can be skipped or not */
|
|
|
if (adapter->device_mode == QDF_SAP_MODE &&
|