mirror of
https://github.com/proski/madwifi
synced 2024-11-22 06:21:47 +03:00
Edit token names for clarity, consistency and length.
This changes some iwpriv names, because I believe they will be more readily usable and understandable git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3279 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
70be1ef404
commit
d136b9b1f9
@ -1069,8 +1069,8 @@ ath_attach(u_int16_t devid, struct net_device *dev, HAL_BUS_TAG tag)
|
||||
ic->ic_get_dfs_cac_time = ath_get_dfs_cac_time;
|
||||
|
||||
/* DFS radar avoidance channel use delay */
|
||||
ic->ic_set_dfs_non_occupancy_period = ath_set_dfs_excl_period;
|
||||
ic->ic_get_dfs_non_occupancy_period = ath_get_dfs_excl_period;
|
||||
ic->ic_set_dfs_excl_period = ath_set_dfs_excl_period;
|
||||
ic->ic_get_dfs_excl_period = ath_get_dfs_excl_period;
|
||||
|
||||
if (register_netdev(dev)) {
|
||||
EPRINTF(sc, "Unable to register device\n");
|
||||
|
@ -69,7 +69,7 @@ static int ieee80211com_media_change(struct net_device *);
|
||||
static struct net_device_stats *ieee80211_getstats(struct net_device *);
|
||||
static int ieee80211_change_mtu(struct net_device *, int);
|
||||
static void ieee80211_set_multicast_list(struct net_device *);
|
||||
static void ieee80211_expire_dfs_channel_non_occupancy_timer(unsigned long);
|
||||
static void ieee80211_expire_dfs_excl_timer(unsigned long);
|
||||
|
||||
MALLOC_DEFINE(M_80211_VAP, "80211vap", "802.11 vap state");
|
||||
|
||||
@ -333,10 +333,10 @@ ieee80211_ifattach(struct ieee80211com *ic)
|
||||
ic->ic_txpowlimit = IEEE80211_TXPOWER_MIN;
|
||||
ic->ic_newtxpowlimit = IEEE80211_TXPOWER_MAX;
|
||||
|
||||
init_timer(&ic->ic_dfs_non_occupancy_timer);
|
||||
ic->ic_dfs_non_occupancy_timer.function =
|
||||
ieee80211_expire_dfs_channel_non_occupancy_timer;
|
||||
ic->ic_dfs_non_occupancy_timer.data = (unsigned long) ic;
|
||||
init_timer(&ic->ic_dfs_excl_timer);
|
||||
ic->ic_dfs_excl_timer.function =
|
||||
ieee80211_expire_dfs_excl_timer;
|
||||
ic->ic_dfs_excl_timer.data = (unsigned long) ic;
|
||||
|
||||
ieee80211_crypto_attach(ic);
|
||||
ieee80211_node_attach(ic);
|
||||
@ -363,7 +363,7 @@ ieee80211_ifdetach(struct ieee80211com *ic)
|
||||
ic->ic_vap_delete(vap);
|
||||
rtnl_unlock();
|
||||
|
||||
del_timer(&ic->ic_dfs_non_occupancy_timer);
|
||||
del_timer(&ic->ic_dfs_excl_timer);
|
||||
ieee80211_scan_detach(ic);
|
||||
ieee80211_proto_detach(ic);
|
||||
ieee80211_crypto_detach(ic);
|
||||
@ -838,7 +838,7 @@ ieee80211_dfs_action(struct ieee80211com *ic) {
|
||||
}
|
||||
|
||||
void
|
||||
ieee80211_expire_channel_non_occupancy_restrictions(struct ieee80211com *ic)
|
||||
ieee80211_expire_excl_restrictions(struct ieee80211com *ic)
|
||||
{
|
||||
struct ieee80211_channel* c = NULL;
|
||||
struct net_device *dev = ic->ic_dev;
|
||||
@ -874,12 +874,12 @@ ieee80211_expire_channel_non_occupancy_restrictions(struct ieee80211com *ic)
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ieee80211_expire_channel_non_occupancy_restrictions);
|
||||
EXPORT_SYMBOL(ieee80211_expire_excl_restrictions);
|
||||
|
||||
/* Update the Non-Occupancy Period timer with the first Non-Occupancy Period
|
||||
* that will expire */
|
||||
static void
|
||||
ieee80211_update_dfs_channel_non_occupancy_timer(struct ieee80211com *ic)
|
||||
ieee80211_update_dfs_excl_timer(struct ieee80211com *ic)
|
||||
{
|
||||
struct ieee80211_channel * chan;
|
||||
struct timeval tv_now, tv_next;
|
||||
@ -907,9 +907,9 @@ ieee80211_update_dfs_channel_non_occupancy_timer(struct ieee80211com *ic)
|
||||
|
||||
if ((tv_next.tv_sec == 0) &&
|
||||
(tv_next.tv_usec == 0)) {
|
||||
del_timer(&ic->ic_dfs_non_occupancy_timer);
|
||||
del_timer(&ic->ic_dfs_excl_timer);
|
||||
} else {
|
||||
mod_timer(&ic->ic_dfs_non_occupancy_timer,
|
||||
mod_timer(&ic->ic_dfs_excl_timer,
|
||||
jiffies_tmp +
|
||||
(tv_next.tv_sec - tv_now.tv_sec + 1) * HZ);
|
||||
}
|
||||
@ -917,7 +917,7 @@ ieee80211_update_dfs_channel_non_occupancy_timer(struct ieee80211com *ic)
|
||||
|
||||
/* Periodically expire radar avoidance marks. */
|
||||
static void
|
||||
ieee80211_expire_dfs_channel_non_occupancy_timer(unsigned long data)
|
||||
ieee80211_expire_dfs_excl_timer(unsigned long data)
|
||||
{
|
||||
struct ieee80211com *ic = (struct ieee80211com *) data;
|
||||
struct ieee80211vap *vap;
|
||||
@ -928,7 +928,7 @@ ieee80211_expire_dfs_channel_non_occupancy_timer(unsigned long data)
|
||||
if (ic->ic_flags_ext & IEEE80211_FEXT_MARKDFS) {
|
||||
/* Make sure there are no channels that have just become
|
||||
* available. */
|
||||
ieee80211_expire_channel_non_occupancy_restrictions(ic);
|
||||
ieee80211_expire_excl_restrictions(ic);
|
||||
/* Go through and clear any interference flag we have, if we
|
||||
* just got it cleared up for us */
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
|
||||
@ -1010,7 +1010,7 @@ ieee80211_expire_dfs_channel_non_occupancy_timer(unsigned long data)
|
||||
}
|
||||
|
||||
/* update the timer */
|
||||
ieee80211_update_dfs_channel_non_occupancy_timer(ic);
|
||||
ieee80211_update_dfs_excl_timer(ic);
|
||||
}
|
||||
|
||||
/* This function is called whenever a radar is detected on channel ichan */
|
||||
@ -1021,7 +1021,7 @@ ieee80211_mark_dfs(struct ieee80211com *ic, struct ieee80211_channel *ichan)
|
||||
struct ieee80211_channel *c=NULL;
|
||||
struct net_device *dev = ic->ic_dev;
|
||||
struct timeval tv_now;
|
||||
unsigned int avoidance_time = ic->ic_get_dfs_non_occupancy_period(ic);
|
||||
unsigned int excl_period = ic->ic_get_dfs_excl_period(ic);
|
||||
int i;
|
||||
|
||||
do_gettimeofday(&tv_now);
|
||||
@ -1041,7 +1041,7 @@ ieee80211_mark_dfs(struct ieee80211com *ic, struct ieee80211_channel *ichan)
|
||||
if (c->ic_freq == ichan->ic_freq) {
|
||||
c->ic_flags |= IEEE80211_CHAN_RADAR;
|
||||
ic->ic_chan_non_occupy[i].tv_sec =
|
||||
tv_now.tv_sec + avoidance_time;
|
||||
tv_now.tv_sec + excl_period;
|
||||
ic->ic_chan_non_occupy[i].tv_usec =
|
||||
tv_now.tv_usec;
|
||||
|
||||
@ -1051,7 +1051,7 @@ ieee80211_mark_dfs(struct ieee80211com *ic, struct ieee80211_channel *ichan)
|
||||
"the channel until: "
|
||||
"%ld.%06ld\n",
|
||||
ichan->ic_ieee, ichan->ic_freq,
|
||||
avoidance_time,
|
||||
excl_period,
|
||||
ic->ic_chan_non_occupy[i].tv_sec,
|
||||
ic->ic_chan_non_occupy[i].tv_usec);
|
||||
}
|
||||
@ -1059,7 +1059,7 @@ ieee80211_mark_dfs(struct ieee80211com *ic, struct ieee80211_channel *ichan)
|
||||
|
||||
/* Recompute the next time a Non-Occupancy Period
|
||||
* expires. */
|
||||
ieee80211_update_dfs_channel_non_occupancy_timer(ic);
|
||||
ieee80211_update_dfs_excl_timer(ic);
|
||||
|
||||
c = ieee80211_find_channel(ic, ichan->ic_freq,
|
||||
ichan->ic_flags);
|
||||
|
@ -632,10 +632,10 @@ enum {
|
||||
IEEE80211_PARAM_TXCONT_RATE = 68, /* continuous transmit mode data rate (in mbit/sec) - will use closest match from current rate table */
|
||||
IEEE80211_PARAM_TXCONT_POWER = 69, /* power level in units of 0.5dBm */
|
||||
IEEE80211_PARAM_DFS_TESTMODE = 70, /* do not perform DFS actions (i.e. markng DFS and channel change on interference), just report them via debug. */
|
||||
IEEE80211_PARAM_DFS_CHANCHECKTIME = 71, /* how long do we wait for chan availability
|
||||
IEEE80211_PARAM_DFS_CACTIME = 71, /* how long do we wait for chan availability
|
||||
scans ?
|
||||
FCC requires 60s, so that is the default. */
|
||||
IEEE80211_PARAM_DFS_NONOCCUPANCYPERIOD = 72, /* DFS no-occupancy limit - how long do we stay
|
||||
IEEE80211_PARAM_DFS_EXCLPERIOD = 72, /* DFS no-occupancy limit - how long do we stay
|
||||
off a channel once radar is detected?
|
||||
FCC requires 30m, so that is the default. */
|
||||
};
|
||||
|
@ -334,7 +334,7 @@ struct ieee80211com {
|
||||
struct ieee80211_channel *ic_curchan; /* current channel */
|
||||
struct ieee80211_channel *ic_bsschan; /* bss channel */
|
||||
int16_t ic_channoise; /* current channel noise in dBm */
|
||||
struct timer_list ic_dfs_non_occupancy_timer;
|
||||
struct timer_list ic_dfs_excl_timer;
|
||||
/*
|
||||
* Spectrum management (IEEE 802.11h-2003):
|
||||
*
|
||||
@ -487,8 +487,8 @@ struct ieee80211com {
|
||||
unsigned int (*ic_get_dfs_cac_time)(struct ieee80211com *);
|
||||
|
||||
/* DFS non-occupancy period (in seconds) */
|
||||
void (*ic_set_dfs_non_occupancy_period)(struct ieee80211com *, unsigned int);
|
||||
unsigned int (*ic_get_dfs_non_occupancy_period)(struct ieee80211com *);
|
||||
void (*ic_set_dfs_excl_period)(struct ieee80211com *, unsigned int);
|
||||
unsigned int (*ic_get_dfs_excl_period)(struct ieee80211com *);
|
||||
|
||||
/* Set coverage class */
|
||||
void (*ic_set_coverageclass)(struct ieee80211com *);
|
||||
@ -693,7 +693,7 @@ int ieee80211_media_setup(struct ieee80211com *, struct ifmedia *, u_int32_t,
|
||||
ifm_change_cb_t, ifm_stat_cb_t);
|
||||
void ieee80211_build_sc_ie(struct ieee80211com *);
|
||||
void ieee80211_dfs_action(struct ieee80211com *);
|
||||
void ieee80211_expire_channel_non_occupancy_restrictions(struct ieee80211com *);
|
||||
void ieee80211_expire_channel_excl_restrictions(struct ieee80211com *);
|
||||
|
||||
/*
|
||||
* Iterate through ic_channels to enumerate all distinct ic_ieee channel numbers.
|
||||
|
@ -1441,13 +1441,13 @@ ieee80211_get_dfs_cac_time(struct net_device *dev,
|
||||
}
|
||||
|
||||
static int
|
||||
ieee80211_get_dfs_non_occupancy_period(struct net_device *dev,
|
||||
ieee80211_get_dfs_excl_period(struct net_device *dev,
|
||||
struct iw_request_info *info, void *w, char *extra)
|
||||
{
|
||||
int *params = (int*) extra;
|
||||
struct ieee80211vap *vap = dev->priv;
|
||||
struct ieee80211com *ic = vap->iv_ic;
|
||||
params[0] = ic->ic_get_dfs_non_occupancy_period(ic);
|
||||
params[0] = ic->ic_get_dfs_excl_period(ic);
|
||||
return 0;
|
||||
}
|
||||
static int
|
||||
@ -1461,13 +1461,13 @@ ieee80211_set_dfs_cac_time(struct net_device *dev,
|
||||
return 0;
|
||||
}
|
||||
static int
|
||||
ieee80211_set_dfs_non_occupancy_period (struct net_device *dev,
|
||||
ieee80211_set_dfs_excl_period (struct net_device *dev,
|
||||
struct iw_request_info *info, void *w, char *extra)
|
||||
{
|
||||
int *params = (int*) extra;
|
||||
struct ieee80211vap *vap = dev->priv;
|
||||
struct ieee80211com *ic = vap->iv_ic;
|
||||
ic->ic_set_dfs_non_occupancy_period(ic, params[1]);
|
||||
ic->ic_set_dfs_excl_period(ic, params[1]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2626,11 +2626,11 @@ ieee80211_ioctl_setparam(struct net_device *dev, struct iw_request_info *info,
|
||||
case IEEE80211_PARAM_TXCONT_POWER:
|
||||
ieee80211_set_txcont_power(dev, info, w, extra);
|
||||
break;
|
||||
case IEEE80211_PARAM_DFS_CHANCHECKTIME:
|
||||
case IEEE80211_PARAM_DFS_CACTIME:
|
||||
ieee80211_set_dfs_cac_time(dev, info, w, extra);
|
||||
break;
|
||||
case IEEE80211_PARAM_DFS_NONOCCUPANCYPERIOD:
|
||||
ieee80211_set_dfs_non_occupancy_period(dev, info, w, extra);
|
||||
case IEEE80211_PARAM_DFS_EXCLPERIOD:
|
||||
ieee80211_set_dfs_excl_period(dev, info, w, extra);
|
||||
break;
|
||||
case IEEE80211_PARAM_COMPRESSION:
|
||||
retv = ieee80211_setathcap(vap, IEEE80211_ATHC_COMP, value);
|
||||
@ -3060,11 +3060,11 @@ ieee80211_ioctl_getparam(struct net_device *dev, struct iw_request_info *info,
|
||||
case IEEE80211_PARAM_TXCONT_POWER:
|
||||
ieee80211_get_txcont_power(dev, info, w, extra);
|
||||
break;
|
||||
case IEEE80211_PARAM_DFS_CHANCHECKTIME:
|
||||
case IEEE80211_PARAM_DFS_CACTIME:
|
||||
ieee80211_get_dfs_cac_time(dev, info, w, extra);
|
||||
break;
|
||||
case IEEE80211_PARAM_DFS_NONOCCUPANCYPERIOD:
|
||||
ieee80211_get_dfs_non_occupancy_period(dev, info, w, extra);
|
||||
case IEEE80211_PARAM_DFS_EXCLPERIOD:
|
||||
ieee80211_get_dfs_excl_period(dev, info, w, extra);
|
||||
break;
|
||||
case IEEE80211_PARAM_PUREG:
|
||||
param[0] = (vap->iv_flags & IEEE80211_F_PUREG) != 0;
|
||||
@ -5424,14 +5424,14 @@ static const struct iw_priv_args ieee80211_priv_args[] = {
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "dfstestmode" },
|
||||
{ IEEE80211_PARAM_DFS_TESTMODE,
|
||||
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_dfstestmode" },
|
||||
{ IEEE80211_PARAM_DFS_CHANCHECKTIME,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "dfschecktime" },
|
||||
{ IEEE80211_PARAM_DFS_CHANCHECKTIME,
|
||||
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_dfschecktim" },
|
||||
{ IEEE80211_PARAM_DFS_NONOCCUPANCYPERIOD,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "dfsnonocclmt" },
|
||||
{ IEEE80211_PARAM_DFS_NONOCCUPANCYPERIOD,
|
||||
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_dfsnonocclmt" },
|
||||
{ IEEE80211_PARAM_DFS_CACTIME,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "dfscactime" },
|
||||
{ IEEE80211_PARAM_DFS_CACTIME,
|
||||
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_dfscactime" },
|
||||
{ IEEE80211_PARAM_DFS_EXCLPERIOD,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "dfsexcltim" },
|
||||
{ IEEE80211_PARAM_DFS_EXCLPERIOD,
|
||||
0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_dfsexcltim" },
|
||||
{ IEEE80211_PARAM_COMPRESSION,
|
||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "compression" },
|
||||
{ IEEE80211_PARAM_COMPRESSION, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user