[PATCH] nl80211: implement set_rate_sets for non-HOSTAPD case

Eliad Peller eliad at wizery.com
Tue May 24 10:32:51 EDT 2011


.set_rate_sets is not defined for non-HOSTAPD, which prevents
configuring basic_rates when working as P2P_GO.

Signed-off-by: Eliad Peller <eliad at wizery.com>
---

i guess similar issues might exist with the other .set_* callbacks?

 src/drivers/driver_nl80211.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index fcf2149..0035e59 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -5173,6 +5173,9 @@ static int i802_get_seqnum(const char *iface, void *priv, const u8 *addr,
 	return -ENOBUFS;
 }
 
+#endif
+
+#if defined(HOSTAPD) || defined(CONFIG_AP)
 
 static int i802_set_rate_sets(void *priv, int *supp_rates, int *basic_rates,
 			      int mode)
@@ -6611,7 +6614,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
 	.sta_clear_stats = i802_sta_clear_stats,
 	.set_rts = i802_set_rts,
 	.set_frag = i802_set_frag,
-	.set_rate_sets = i802_set_rate_sets,
 	.set_cts_protect = i802_set_cts_protect,
 	.set_preamble = i802_set_preamble,
 	.set_short_slot_time = i802_set_short_slot_time,
@@ -6621,6 +6623,7 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
 	.set_ht_params = i802_set_ht_params,
 #endif /* HOSTAPD */
 #if defined(HOSTAPD) || defined(CONFIG_AP)
+	.set_rate_sets = i802_set_rate_sets,
 	.sta_deauth = i802_sta_deauth,
 	.sta_disassoc = i802_sta_disassoc,
 #endif /* HOSTAPD || CONFIG_AP */
-- 
1.7.0.4



More information about the HostAP mailing list