This patch allows the setting of beacon interval.
Setting can be done via authsae config file.
---
 README                |    3 ++-
 ampe.h                |    1 +
 linux/meshd-nl80211.c |    5 ++++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 93d75ad..e969d85 100644
--- a/README
+++ b/README
@@ -104,7 +104,8 @@ Lines beginning with '#' are treated as comments and 
ignored.
        channel: which channel to use in the defined band. Default
                is 6.
        mcast-rate: set multicast/broadcast transmission rate. Default is 
-               1Mbps for 2.4GHz or 6Mbps for 5GHz 
+               1Mbps for 2.4GHz or 6Mbps for 5GHz
+       beacon-interval: set beacon interval in TUs. 
        
 HOW TO USE
 
diff --git a/ampe.h b/ampe.h
index 03f2fab..4c7e42c 100644
--- a/ampe.h
+++ b/ampe.h
@@ -59,6 +59,7 @@ struct meshd_config {
     unsigned char rates[MAX_SUPP_RATES];
     uint16_t ht_prot_mode;
     int mcast_rate;
+    int beacon_interval;
 };
 
 /* the single global interface and mesh node info we're handling.
diff --git a/linux/meshd-nl80211.c b/linux/meshd-nl80211.c
index 11ceab0..386d54b 100644
--- a/linux/meshd-nl80211.c
+++ b/linux/meshd-nl80211.c
@@ -1104,6 +1104,9 @@ static int join_mesh_rsn(struct netlink_config_s *nlcfg, 
struct meshd_config *mc
     if (mconf->mcast_rate > 0)
         NLA_PUT_U32(msg, NL80211_ATTR_MCAST_RATE, mconf->mcast_rate);
 
+    if (mconf->beacon_interval > 0)
+        NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL, mconf->beacon_interval);
+
     ret = send_nlmsg(nlcfg->nl_sock, msg);
     if (ret < 0)
         fprintf(stderr,"Mesh start failed: %d (%s)\n", ret, strerror(-ret));
@@ -1201,7 +1204,7 @@ meshd_parse_libconfig (struct config_setting_t 
*meshd_section,
 
     CONFIG_LOOKUP(channel, channel);
     CONFIG_LOOKUP(mcast-rate, mcast_rate);
-
+    CONFIG_LOOKUP(beacon-interval,beacon_interval);
 #undef CONFIG_LOOKUP
 
     config->band = MESHD_11b;
-- 
1.7.2.5

_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to