Show
Ignore:
Timestamp:
01/31/08 00:50:16 (4 years ago)
Author:
mtaylor
Message:

This patch adds iwpriv values for setting the
time in ms, or the number of beacons for the
beacon miss alarm. If we haven't had a beacon
in this period, the alarm is sounded and
action (i.e. roaming) is taken.

This patch changes the storage of the beacon
miss threshold to integral beacon count but
corrects the previous intent.

The default beacon miss alarm is going to be
850ms which is half way between the two hard
coded limits that were there before.

The old hard coded limits assumed that the
beacon interval was 100ms and set the limit to
10 (1000ms) for software beacon miss timer
and 7 for hardware beacon miss timer.

The new default is 850ms (the midpoint between
the two previous defaults). This value is rounded
up to the next nearest beacon interval.

There is no upper bound on the beacon miss
threshold specified, since it may need to be
wildly inflated with 25ms beacon interval, or
wildly reduced with 1000ms beacon interval.

The minimum is still 2 beacons, regardless of
the beacon interval.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/trunk/net80211/ieee80211_var.h

    r3279 r3314  
    5555 *   a value range from 0 to 127. 
    5656 */ 
    57 #define IEEE80211_TXPOWER_MAX   127           /* .5 dBm units */ 
    58 #define IEEE80211_TXPOWER_MIN   0             /* kill radio */ 
    59  
    60 #define IEEE80211_DTIM_MAX      15            /* max DTIM period */ 
    61 #define IEEE80211_DTIM_MIN      1             /* min DTIM period */ 
    62 #define IEEE80211_DTIM_DEFAULT  1             /* default DTIM period */ 
    63  
    64 #define IEEE80211_BINTVAL_MAX   1000          /* max beacon interval (TUs) */ 
    65 #define IEEE80211_BINTVAL_MIN   25            /* min beacon interval (TUs) */ 
    66 #define IEEE80211_BINTVAL_DEFAULT 100         /* default beacon interval (TUs) */ 
     57#define IEEE80211_TXPOWER_MAX          127    /* .5 dBm units */ 
     58#define IEEE80211_TXPOWER_MIN          0      /* kill radio */ 
     59 
     60#define IEEE80211_DTIM_MAX             15     /* max DTIM period */ 
     61#define IEEE80211_DTIM_MIN             1      /* min DTIM period */ 
     62#define IEEE80211_DTIM_DEFAULT         1      /* default DTIM period */ 
     63 
     64#define IEEE80211_BINTVAL_MAX          1000   /* max beacon interval (TUs) */ 
     65#define IEEE80211_BINTVAL_MIN          25     /* min beacon interval (TUs) */ 
     66#define IEEE80211_BINTVAL_DEFAULT      100    /* default beacon interval (TUs) */ 
    6767#define IEEE80211_BINTVAL_VALID(_bi) \ 
    6868        ((IEEE80211_BINTVAL_MIN <= (_bi)) && \ 
     
    7272         (_bi) : IEEE80211_BINTVAL_DEFAULT) 
    7373 
     74#define IEEE80211_BMISSTHRESH_BMIN      2       /* min bmiss threshold (beacons) */ 
     75/* Default beacon miss threshold is set to roundup from 850ms  
     76 * This is halfway between the 10@100ms default from prior hardcoded setting for 
     77 * software beacon miss timers, and the 7@100ms default from prior hardcoded  
     78 * timer value for hardware beacon miss timer. 
     79 * Based upon emperical evidence and practices of commercial vendors, I believe 
     80 * this should really be 2500ms by default. */ 
     81#define IEEE80211_BMISSTHRESH_DEFAULT_MS 850 
     82 
     83#define IEEE80211_BMISSTHRESH_VALID(_bmt) \ 
     84        (IEEE80211_BMISSTHRESH_BMIN <= (_bmt)) 
     85#define IEEE80211_BMISSTHRESH_SANITISE(_bmt) \ 
     86        ((IEEE80211_BMISSTHRESH_BMIN > (_bmt)) ? \ 
     87         IEEE80211_BMISSTHRESH_BMIN : (_bmt)) 
     88 
    7489#define IEEE80211_BGSCAN_INTVAL_MIN     15      /* min bg scan intvl (secs) */ 
    7590#define IEEE80211_BGSCAN_INTVAL_DEFAULT (5*60)  /* default bg scan intvl */ 
     
    89104 
    90105#define IEEE80211_FIXED_RATE_NONE       -1 
    91  
    92 #define IEEE80211_SWBMISS_THRESHOLD     10      /* software beacon miss threshold, in TUs */ 
    93106 
    94107#define DEV_NAME(_d) \ 
     
    304317        u_int16_t ic_lintval;                   /* beacon interval */ 
    305318        u_int16_t ic_holdover;                  /* PM hold over duration */ 
    306         u_int16_t ic_bmisstimeout;             /* beacon miss threshold (ms) */ 
     319        u_int16_t ic_bmissthreshold;           /* beacon miss threshold (# beacons) */ 
    307320        unsigned long ic_bmiss_guard;           /* when to cease ignoring bmiss (jiffies) */ 
    308321        u_int16_t ic_txpowlimit;                /* global tx power limit (in 0.5 dBm) */