Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2012 20:08:50 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r231710 - head/tools/tools/ath/athradar
Message-ID:  <201202142008.q1EK8ocj016177@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Feb 14 20:08:50 2012
New Revision: 231710
URL: http://svn.freebsd.org/changeset/base/231710

Log:
  Add some missing radar config parameters.

Modified:
  head/tools/tools/ath/athradar/athradar.c

Modified: head/tools/tools/ath/athradar/athradar.c
==============================================================================
--- head/tools/tools/ath/athradar/athradar.c	Tue Feb 14 20:06:28 2012	(r231709)
+++ head/tools/tools/ath/athradar/athradar.c	Tue Feb 14 20:08:50 2012	(r231710)
@@ -101,6 +101,8 @@ radarset(struct radarhandler *radar, int
 	pe.pe_enmaxrssi = HAL_PHYERR_PARAM_NOVAL;
 
 	pe.pe_extchannel = HAL_PHYERR_PARAM_NOVAL;
+	pe.pe_enrelpwr = HAL_PHYERR_PARAM_NOVAL;
+	pe.pe_en_relstep_check = HAL_PHYERR_PARAM_NOVAL;
 
 	switch (op) {
 	case DFS_PARAM_ENABLE:
@@ -142,7 +144,14 @@ radarset(struct radarhandler *radar, int
 	case DFS_PARAM_EN_EXTCH:
 		pe.pe_extchannel = param;
 		break;
+	case DFS_PARAM_RELPWR_EN:
+		pe.pe_enrelpwr = param;
+		break;
+	case DFS_PARAM_RELSTEP_EN:
+		pe.pe_en_relstep_check = param;
+		break;
 	}
+
 	radar->atd.ad_id = DFS_SET_THRESH | ATH_DIAG_IN;
 	radar->atd.ad_out_data = NULL;
 	radar->atd.ad_out_size = 0;
@@ -182,16 +191,21 @@ radar_get(struct radarhandler *radar)
 	printf("    pe_blockradar: %d\n", pe.pe_blockradar);
 	printf("    pe_enmaxrssi: %d\n", pe.pe_enmaxrssi);
 	printf("    pe_extchannel: %d\n", pe.pe_extchannel);
+	printf("    pe_enrelpwr: %d\n", pe.pe_enrelpwr);
+	printf("    pe_en_relstep_check: %d\n", pe.pe_en_relstep_check);
 }
 
 static int
-radar_set_param(struct radarhandler *radar, const char *param, const char *val)
+radar_set_param(struct radarhandler *radar, const char *param,
+    const char *val)
 {
 	int v;
 
 	v = atoi(val);
 
-	if (strcmp(param, "firpwr") == 0) {
+	if (strcmp(param, "enabled") == 0) {
+		radarset(radar, DFS_PARAM_ENABLE, v);
+	} else if (strcmp(param, "firpwr") == 0) {
 		radarset(radar, DFS_PARAM_FIRPWR, v);
 	} else if (strcmp(param, "rrssi") == 0) {
 		radarset(radar, DFS_PARAM_RRSSI, v);
@@ -215,6 +229,10 @@ radar_set_param(struct radarhandler *rad
 		radarset(radar, DFS_PARAM_MAXRSSI_EN, v);
 	} else if (strcmp(param, "extchannel") == 0) {
 		radarset(radar, DFS_PARAM_EN_EXTCH, v);
+	} else if (strcmp(param, "enrelpwr") == 0) {
+		radarset(radar, DFS_PARAM_RELPWR_EN, v);
+	} else if (strcmp(param, "en_relstep_check") == 0) {
+		radarset(radar, DFS_PARAM_RELSTEP_EN, v);
 	} else {
 		return 0;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202142008.q1EK8ocj016177>