source: trunk/package/iw/patches/501-ibss-bintval.patch @ 25135

Last change on this file since 25135 was 25135, checked in by acinonyx, 5 years ago

[package] iw: Refresh patches

File size: 1.9 KB
  • ibss.c

    iw: Add ibss join parameter for beacon interval
    
    From: Bruno Randolf <br1@einfach.org>
    
    NL80211_ATTR_BEACON_INTERVAL already exists, we just have to use it.
    
    Signed-off-by: Bruno Randolf <br1@einfach.org>
    ---
     ibss.c |   19 ++++++++++++++++---
     1 files changed, 16 insertions(+), 3 deletions(-)
    
    a b static int join_ibss(struct nl80211_stat 
    2626        int n_rates = 0; 
    2727        char *value = NULL, *sptr = NULL; 
    2828        float rate; 
     29        int bintval; 
    2930 
    3031        if (argc < 2) 
    3132                return 1; 
    static int join_ibss(struct nl80211_stat 
    5758                } 
    5859        } 
    5960 
     61        if (argc > 1 && strcmp(argv[0], "beacon-interval") == 0) { 
     62                argv++; 
     63                argc--; 
     64                bintval = strtoul(argv[0], &end, 10); 
     65                if (*end != '\0') 
     66                        return 1; 
     67                NLA_PUT_U32(msg, NL80211_ATTR_BEACON_INTERVAL, bintval); 
     68                argv++; 
     69                argc--; 
     70        } 
     71 
    6072        /* basic rates */ 
    6173        if (argc > 1 && strcmp(argv[0], "basic-rates") == 0) { 
    6274                argv++; 
    COMMAND(ibss, leave, NULL, 
    122134        NL80211_CMD_LEAVE_IBSS, 0, CIB_NETDEV, leave_ibss, 
    123135        "Leave the current IBSS cell."); 
    124136COMMAND(ibss, join, 
    125         "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] " 
    126         "[basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [key d:0:abcde]", 
     137        "<SSID> <freq in MHz> [fixed-freq] [<fixed bssid>] [beacon-interval " 
     138        "<TU>] [basic-rates <rate in Mbps,rate2,...>] [mcast-rate <rate in Mbps>] [key d:0:abcde]", 
    127139        NL80211_CMD_JOIN_IBSS, 0, CIB_NETDEV, join_ibss, 
    128140        "Join the IBSS cell with the given SSID, if it doesn't exist create\n" 
    129141        "it on the given frequency. When fixed frequency is requested, don't\n" 
    130142        "join/create a cell on a different frequency. When a fixed BSSID is\n" 
    131143        "requested use that BSSID and do not adopt another cell's BSSID even\n" 
    132         "if it has higher TSF and the same SSID."); 
     144        "if it has higher TSF and the same SSID. If an IBSS is created, create\n" 
     145        "it with the specified basic-rates and beacon-interval (in TU)."); 
Note: See TracBrowser for help on using the repository browser.