mirror of https://github.com/proski/madwifi
Move DEV_NAME macro from if_ath.c to ieee80211_var.h, and expand on it.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2879 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
8173daf0ad
commit
c717e369fd
|
@ -279,8 +279,6 @@ static int countrycode = -1;
|
|||
static int outdoor = -1;
|
||||
static int xchanmode = -1;
|
||||
|
||||
#define DEV_NAME(_d) ((!_d || !_d->name || !strncmp(_d->name, "wifi%d", 6)) ? "MadWifi" : _d->name)
|
||||
|
||||
static const char *hal_status_desc[] = {
|
||||
"No error",
|
||||
"No hardware present or device not yet supported",
|
||||
|
|
|
@ -92,6 +92,23 @@ Note: Atheros chips use 7 bits when power is specified in half dBm units, with a
|
|||
|
||||
#define IEEE80211_SWBMISS_THRESHOLD 10 /* software beacon miss threshold, in TUs */
|
||||
|
||||
#define DEV_NAME(_d) \
|
||||
((NULL == _d || NULL == _d->name || 0 == strncmp(_d->name, "wifi%d", 6)) ? \
|
||||
"MadWifi" : \
|
||||
_d->name)
|
||||
#define VAP_DEV_NAME(_v) \
|
||||
((NULL == _v) ? \
|
||||
"MadWifi" : \
|
||||
DEV_NAME(_v->iv_dev))
|
||||
#define VAP_DEV_NAME(_v) \
|
||||
((NULL == _v) ? \
|
||||
"MadWifi" : \
|
||||
DEV_NAME(_v->iv_dev))
|
||||
#define VAP_IC_DEV_NAME(_v) \
|
||||
((NULL == _v || NULL == _v->iv_ic) ? \
|
||||
"MadWifi" : \
|
||||
DEV_NAME(_v->iv_ic->ic_dev))
|
||||
|
||||
#define IEEE80211_MS_TO_TU(x) (((x) * 1000) / 1024)
|
||||
#define IEEE80211_TU_TO_MS(x) (((x) * 1024) / 1000)
|
||||
#define IEEE80211_TU_TO_JIFFIES(x) ((IEEE80211_TU_TO_MS(x) * HZ) / 1000)
|
||||
|
|
Loading…
Reference in New Issue