[PATCH 4/4] bgscan: Update all bgscan modules to accept new txrate and noise parameters

Paul Stewart pstew
Fri Oct 1 10:32:39 PDT 2010


From: Paul Stewart <pstew at google.com>

Signed-off-by: Paul Stewart <pstew at google.com>
---
 wpa_supplicant/bgscan.c        |    7 +++++--
 wpa_supplicant/bgscan.h        |   11 ++++++++---
 wpa_supplicant/bgscan_learn.c  |    8 ++++++--
 wpa_supplicant/bgscan_simple.c |    4 +++-
 4 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/wpa_supplicant/bgscan.c b/wpa_supplicant/bgscan.c
index e76e954..5661830 100644
--- a/wpa_supplicant/bgscan.c
+++ b/wpa_supplicant/bgscan.c
@@ -112,9 +112,12 @@ void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
 
 
 void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
-				 int current_signal)
+				 int current_signal, int current_noise,
+				 int current_txrate)
 {
 	if (wpa_s->bgscan && wpa_s->bgscan_priv)
 		wpa_s->bgscan->notify_signal_change(wpa_s->bgscan_priv, above,
-						    current_signal);
+						    current_signal,
+						    current_noise,
+						    current_txrate);
 }
diff --git a/wpa_supplicant/bgscan.h b/wpa_supplicant/bgscan.h
index 9f2ba2f..bcd9115 100644
--- a/wpa_supplicant/bgscan.h
+++ b/wpa_supplicant/bgscan.h
@@ -28,7 +28,9 @@ struct bgscan_ops {
 	int (*notify_scan)(void *priv, struct wpa_scan_results *scan_res);
 	void (*notify_beacon_loss)(void *priv);
 	void (*notify_signal_change)(void *priv, int above,
-				     int current_signal);
+				     int current_signal,
+				     int current_noise,
+				     int current_txrate);
 };
 
 #ifdef CONFIG_BGSCAN
@@ -39,7 +41,8 @@ int bgscan_notify_scan(struct wpa_supplicant *wpa_s,
 		       struct wpa_scan_results *scan_res);
 void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s);
 void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s, int above,
-				 int current_signal);
+				 int current_signal, int current_noise,
+				 int current_txrate);
 
 #else /* CONFIG_BGSCAN */
 
@@ -64,7 +67,9 @@ static inline void bgscan_notify_beacon_loss(struct wpa_supplicant *wpa_s)
 }
 
 static inline void bgscan_notify_signal_change(struct wpa_supplicant *wpa_s,
-					       int above, int current_signal)
+					       int above, int current_signal,
+					      int current_noise,
+					      int current_txrate)
 {
 }
 
diff --git a/wpa_supplicant/bgscan_learn.c b/wpa_supplicant/bgscan_learn.c
index 492ce38..ee79511 100644
--- a/wpa_supplicant/bgscan_learn.c
+++ b/wpa_supplicant/bgscan_learn.c
@@ -556,7 +556,9 @@ static void bgscan_learn_notify_beacon_loss(void *priv)
 
 
 static void bgscan_learn_notify_signal_change(void *priv, int above,
-					      int current_signal)
+					      int current_signal,
+					      int current_noise,
+					      int current_txrate)
 {
 	struct bgscan_learn_data *data = priv;
 	int scan = 0;
@@ -567,7 +569,9 @@ static void bgscan_learn_notify_signal_change(void *priv, int above,
 		return;
 
 	wpa_printf(MSG_DEBUG, "bgscan learn: signal level changed "
-		   "(above=%d current_signal=%d)", above, current_signal);
+		   "(above=%d current_signal=%d current_noise=%d "
+		   "current_txrate=%d)", above, current_signal,
+		   current_noise, current_txrate);
 	if (data->scan_interval == data->long_interval && !above) {
 		wpa_printf(MSG_DEBUG, "bgscan learn: Start using short bgscan "
 			   "interval");
diff --git a/wpa_supplicant/bgscan_simple.c b/wpa_supplicant/bgscan_simple.c
index 6325d73..0757d57 100644
--- a/wpa_supplicant/bgscan_simple.c
+++ b/wpa_supplicant/bgscan_simple.c
@@ -177,7 +177,9 @@ static void bgscan_simple_notify_beacon_loss(void *priv)
 
 
 static void bgscan_simple_notify_signal_change(void *priv, int above,
-					       int current_signal)
+					       int current_signal,
+					       int current_noise,
+					       int current_txrate)
 {
 	struct bgscan_simple_data *data = priv;
 	int scan = 0;
-- 
1.7.1




More information about the Hostap mailing list