AP: Add 40 MHz channel bandwidth capability support for 2.4 GHz band

This change extends the earlier 40 MHz support in hostapd.conf for 5 GHz
band to 2.4 GHz band APs with the help of a new parameter option
"2.4_HT40" in the "-r" command-line argument.

Also update default_ap_chwidth variable name with
default_11na_ap_chwidth to refer to 5 GHz.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
diff --git a/sigma_dut.c b/sigma_dut.c
index 637945c..a2ec281 100644
--- a/sigma_dut.c
+++ b/sigma_dut.c
@@ -688,7 +688,8 @@
 {
 	dut->ap_p2p_cross_connect = -1;
 	dut->ap_chwidth = AP_AUTO;
-	dut->default_ap_chwidth = AP_AUTO;
+	dut->default_11na_ap_chwidth = AP_AUTO;
+	dut->default_11ng_ap_chwidth = AP_AUTO;
 	/* by default, enable writing of traffic stream stats */
 	dut->write_stats = 1;
 }
@@ -827,7 +828,9 @@
 			break;
 		case 'r':
 			if (strcmp(optarg, "HT40") == 0) {
-				sigma_dut.default_ap_chwidth = AP_40;
+				sigma_dut.default_11na_ap_chwidth = AP_40;
+			} else if (strcmp(optarg, "2.4_HT40") == 0) {
+				sigma_dut.default_11ng_ap_chwidth = AP_40;
 			} else {
 				printf("Unsupported -r value\n");
 				exit(1);
@@ -940,7 +943,7 @@
 			       "       [-N <device_get_info vendor>] \\\n"
 			       "       [-o <device_get_info model>] \\\n"
 			       "       [-O <device_get_info version>] \\\n"
-			       "       [-r <HT40>]\n");
+			       "       [-r <HT40 or 2.4_HT40>]\n");
 			printf("local command: sigma_dut [-p<port>] "
 			       "<-l<cmd>>\n");
 			exit(0);