This patch allows the setting of beacon interval. 
Setting can be done via authsae config file.
I have added a becon_interval variable in the configuration structure
(struct meshd_config) because I do not know if I can use the beacon
variable already defined in this structure.

Signed-off-by: cedric voncken <[email protected]>
------------------
--- a/ampe.h    2013-04-17 10:06:21.000000000 +0200
+++ b/ampe.h    2013-04-18 12:35:56.000000000 +0200
@@ -60,6 +60,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.
-------
--- a/linux/meshd-nl80211.c     2013-04-17 10:06:21.000000000 +0200
+++ b/linux/meshd-nl80211.c 2013-04-18 13:40:57.475719109 +0200
@@ -1104,6 +1104,9 @@ static int join_mesh_rsn(struct netlink_
     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_set
 
     CONFIG_LOOKUP(channel, channel);
     CONFIG_LOOKUP(mcast-rate, mcast_rate);
-
+    CONFIG_LOOKUP(beacon-interval,beacon_interval);
 #undef CONFIG_LOOKUP
 
     config->band = MESHD_11b;
-----
--- a/README    2013-04-17 10:06:21.000000000 +0200
+++ b/README    2013-04-18 13:39:20.436939052 +0200
@@ -104,7 +104,8 @@
        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

--
Cedric Voncken 


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

Reply via email to