瀏覽代碼

qcacmn: Rectify logic for disabling indoor channels on SAP start

Currently the logic present for disabling the indoor channels during SAP
start is not complete. The way of using the two ini deviates the driver
from the expected behavior.

Mark the indoor channels correctly during SAP start and SAP stop as per
the expected behavior.

Change-Id: Ia136dcbc4f20ad72812f096531863aeb5fbe66fb
CRs-Fixed: 2368218
Sourav Mohapatra 6 年之前
父節點
當前提交
2cd5c4ca25
共有 1 個文件被更改,包括 13 次插入26 次删除
  1. 13 26
      umac/regulatory/core/src/reg_services.c

+ 13 - 26
umac/regulatory/core/src/reg_services.c

@@ -2183,47 +2183,34 @@ static void reg_modify_chan_list_for_dfs_channels(struct regulatory_channel
 		}
 	}
 }
+
 static void reg_modify_chan_list_for_indoor_channels(
 		struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
 {
 	enum channel_enum chan_enum;
 	struct regulatory_channel *chan_list = pdev_priv_obj->cur_chan_list;
 
-	if (pdev_priv_obj->indoor_chan_enabled)
-		return;
-
-	if (!pdev_priv_obj->force_ssc_disable_indoor_channel) {
+	if (!pdev_priv_obj->indoor_chan_enabled) {
 		for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
 			if (REGULATORY_CHAN_INDOOR_ONLY &
 			    chan_list[chan_enum].chan_flags) {
 				chan_list[chan_enum].state =
-					CHANNEL_STATE_DISABLE;
+					CHANNEL_STATE_DFS;
 				chan_list[chan_enum].chan_flags |=
-					REGULATORY_CHAN_DISABLED;
+					REGULATORY_CHAN_NO_IR;
 			}
 		}
-	} else {
+	}
 
+	if (pdev_priv_obj->force_ssc_disable_indoor_channel &&
+	    pdev_priv_obj->sap_state) {
 		for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
-
-			if (pdev_priv_obj->sap_state) {
-
-				if (REGULATORY_CHAN_INDOOR_ONLY &
-					chan_list[chan_enum].chan_flags) {
-					chan_list[chan_enum].state =
-						CHANNEL_STATE_DISABLE;
-					chan_list[chan_enum].chan_flags |=
-						REGULATORY_CHAN_DISABLED;
-				}
-			} else {
-
-				if (REGULATORY_CHAN_INDOOR_ONLY &
-					chan_list[chan_enum].chan_flags) {
-					chan_list[chan_enum].state =
-						CHANNEL_STATE_DFS;
-					chan_list[chan_enum].chan_flags |=
-						REGULATORY_CHAN_NO_IR;
-				}
+			if (REGULATORY_CHAN_INDOOR_ONLY &
+			    chan_list[chan_enum].chan_flags) {
+				chan_list[chan_enum].state =
+					CHANNEL_STATE_DISABLE;
+				chan_list[chan_enum].chan_flags |=
+					REGULATORY_CHAN_DISABLED;
 			}
 		}
 	}