Changeset 3476

Show
Ignore:
Timestamp:
04/09/08 05:24:05 (5 months ago)
Author:
mtaylor
Message:

This patch cleans up the VAP creation API.

The need to use software instead of hardware for beacon timers in AP+STA mode (aka nosbeacon) is now just determined in software, as we always knew whether or not to enable this.

The confusing bssid and -bssid parameters are now deprecated.

The "uniquebssid" flag is equivalent to "bssid" and can be used to force IEEE80211_CLONE_BSSID flag. If this is not specified, then the BSSID used will be the next unused BSSID in the sequence, which could very well be the parent device's MAC address.

"uniquebssid" equates directly to IEEE80211_CLONE_BSSID" flag therefore.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/trunk/ath/if_ath.c

    r3456 r3476  
    12281228                if (sc->sc_nstavaps != 0)  /* only one sta regardless */ 
    12291229                        return NULL; 
    1230                 if ((sc->sc_nvaps != 0) && (!(flags & IEEE80211_NO_STABEACONS))) 
    1231                         return NULL;   /* If using station beacons, must first up */ 
    1232                 if (flags & IEEE80211_NO_STABEACONS) { 
     1230                /* If we already have an AP VAP, we can still add a station VAP 
     1231                 * but we must not attempt to re-use the hardware beacon timers 
     1232                 * since the AP is already using them, and we must stay in AP  
     1233                 * opmode. */ 
     1234                if (sc->sc_nvaps != 0) { 
     1235                        flags |= IEEE80211_USE_SW_BEACON_TIMERS; 
    12331236                        sc->sc_nostabeacons = 1; 
    12341237                        ic_opmode = IEEE80211_M_HOSTAP; /* Run with chip in AP mode */ 
    1235                 } else 
     1238                } else { 
    12361239                        ic_opmode = opmode; 
     1240                } 
    12371241                break; 
    12381242        case IEEE80211_M_IBSS: 
  • madwifi/trunk/net80211/ieee80211.c

    r3412 r3476  
    455455        case IEEE80211_M_STA: 
    456456                /* WDS/Repeater */ 
    457                 if (flags & IEEE80211_NO_STABEACONS) 
     457                if (flags & IEEE80211_USE_SW_BEACON_TIMERS) 
    458458                        vap->iv_flags_ext |= IEEE80211_FEXT_SWBMISS; 
    459459                break; 
  • madwifi/trunk/net80211/ieee80211_ioctl.h

    r3367 r3476  
    659659        u_int16_t icp_opmode;                   /* operating mode */ 
    660660        u_int16_t icp_flags;                    /* see below */ 
    661 #define IEEE80211_CLONE_BSSID   0x0001        /* allocate unique mac/bssid */ 
    662 #define IEEE80211_NO_STABEACONS        0x0002         /* Do not setup the station beacon timers */ 
     661#define IEEE80211_CLONE_BSSID          0x0001 /* allocate unique mac/bssid */ 
     662#define IEEE80211_USE_SW_BEACON_TIMERS 0x0002 /* Do not setup the station beacon timers */ 
    663663}; 
    664664 
  • madwifi/trunk/tools/man/wlanconfig.8

    r2513 r3476  
    1919.SH "ARGUMENTS" 
    2020.TP 
    21 .B <vap> create [nounit] wlandev <base device> wlanmode <mode> [bssid|-bssid] [nosbeacon
     21.B <vap> create [nounit] wlandev <base device> wlanmode <mode> [uniquebssid
    2222Create the interface <vap> using the specified <base device> and <mode>. <vap> can either be a full interface name (e.g. 'ath0'), or just the suffix (e.g. 'ath'), in which case, the kernel will automatically append the next vacant integer. [nounit] will turn off the automatic integer increments. 
    2323.TP 
     
    5050.SH "OPTIONS" 
    5151.TP 
     52.B uniquebssid 
     53Create the VAP using a new unique MAC address, different from the underlying device. 
     54.TP 
    5255.B bssid 
    53 Create the VAP using a different MAC address from the underlying device
     56Synonym for uniquebssid, for backward compatibility
    5457.TP 
    5558.B \-bssid 
    56 Create the VAP using the MAC address of the underlying device
    57 .TP  
     59Ignored for backward compatibility
     60.TP 
    5861.B nosbeacon 
    59 When both station VAPS and AP VAPs coexist, the station should be created with the nosbeacon flag set in order to disable the use of hardware beacon times for the station
     62Ignored for backward compatibility
    6063.PP 
    6164.SH "LIST ITEMS" 
  • madwifi/trunk/tools/wlanconfig.c

    r3244 r3476  
    285285{ 
    286286        fprintf(stderr, "usage: wlanconfig athX create [nounit] wlandev wifiY\n"); 
    287         fprintf(stderr, "            wlanmode [sta|adhoc|ap|monitor|wds|ahdemo] [bssid | -bssid] [nosbeacon]\n"); 
     287        fprintf(stderr, "            wlanmode [sta|adhoc|ap|monitor|wds|ahdemo] [uniquebssid]\n"); 
    288288        fprintf(stderr, "usage: wlanconfig athX destroy\n"); 
    289289        fprintf(stderr, "usage: wlanconfig athX list [active|ap|caps|chan|freq|keys|scan|sta|wme]\n"); 
     
    319319 
    320320        cp = (s[0] == '-' ? s + 1 : s); 
    321         if (strcmp(cp, "bssid") == 0) 
     321        if (strcmp(cp, "bssid") == 0) { 
     322                printf("WARNING: the -bssid and bssid flags are deprecated.\n"); 
    322323                flag = IEEE80211_CLONE_BSSID; 
    323         if (strcmp(cp, "nosbeacon") == 0) 
    324                 flag |= IEEE80211_NO_STABEACONS; 
     324        } 
     325        if (strcmp(cp, "uniquebssid") == 0) 
     326                flag = IEEE80211_CLONE_BSSID; 
     327        if (strcmp(cp, "nosbeacon") == 0) { 
     328                printf("WARNING: the nosbeacon flag has been deprecated.\n"); 
     329                return 0; /* deprecated but skip */ 
     330        } 
    325331        if (flag == 0) 
    326332                errx(1, "unknown create option %s", s);