PERFORCE change 119757 for review
Sepherosa Ziehau
sephe at FreeBSD.org
Sun May 13 05:35:51 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=119757
Change 119757 by sephe at sephe_zealot:sam_wifi on 2007/05/13 05:35:45
u_intX_t -> uintX_t
Approved by: sam
Affected files ...
.. //depot/projects/wifi/sys/net80211/ieee80211_scan.c#13 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_scan.h#8 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_scan_ap.c#7 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#19 edit
Differences ...
==== //depot/projects/wifi/sys/net80211/ieee80211_scan.c#13 (text+ko) ====
@@ -833,8 +833,8 @@
#ifdef IEEE80211_DEBUG
static void
-dump_probe_beacon(u_int8_t subtype, int isnew,
- const u_int8_t mac[IEEE80211_ADDR_LEN],
+dump_probe_beacon(uint8_t subtype, int isnew,
+ const uint8_t mac[IEEE80211_ADDR_LEN],
const struct ieee80211_scanparams *sp)
{
@@ -940,7 +940,7 @@
* Mark a scan cache entry after a successful associate.
*/
void
-ieee80211_scan_assoc_success(struct ieee80211com *ic, const u_int8_t mac[])
+ieee80211_scan_assoc_success(struct ieee80211com *ic, const uint8_t mac[])
{
struct ieee80211_scan_state *ss = ic->ic_scan;
@@ -956,7 +956,7 @@
*/
void
ieee80211_scan_assoc_fail(struct ieee80211com *ic,
- const u_int8_t mac[], int reason)
+ const uint8_t mac[], int reason)
{
struct ieee80211_scan_state *ss = ic->ic_scan;
==== //depot/projects/wifi/sys/net80211/ieee80211_scan.h#8 (text+ko) ====
@@ -38,8 +38,8 @@
struct ieee80211_scanner;
struct ieee80211_scan_ssid {
- int len; /* length in bytes */
- u_int8_t ssid[IEEE80211_NWID_LEN]; /* ssid contents */
+ int len; /* length in bytes */
+ uint8_t ssid[IEEE80211_NWID_LEN]; /* ssid contents */
};
#define IEEE80211_SCAN_MAX_SSID 1
@@ -47,20 +47,20 @@
struct ieee80211com *ss_ic;
const struct ieee80211_scanner *ss_ops; /* policy hookup, see below */
void *ss_priv; /* scanner private state */
- u_int16_t ss_flags;
+ uint16_t ss_flags;
#define IEEE80211_SCAN_NOPICK 0x0001 /* scan only, no selection */
#define IEEE80211_SCAN_ACTIVE 0x0002 /* active scan (probe req) */
#define IEEE80211_SCAN_PICK1ST 0x0004 /* ``hey sailor'' mode */
#define IEEE80211_SCAN_BGSCAN 0x0008 /* bg scan, exit ps at end */
#define IEEE80211_SCAN_ONCE 0x0010 /* do one complete pass */
#define IEEE80211_SCAN_GOTPICK 0x1000 /* got candidate, can stop */
- u_int8_t ss_nssid; /* # ssid's to probe/match */
+ uint8_t ss_nssid; /* # ssid's to probe/match */
struct ieee80211_scan_ssid ss_ssid[IEEE80211_SCAN_MAX_SSID];
/* ssid's to probe/match */
/* ordered channel set */
struct ieee80211_channel *ss_chans[IEEE80211_SCAN_MAX];
- u_int16_t ss_next; /* ix of next chan to scan */
- u_int16_t ss_last; /* ix+1 of last chan to scan */
+ uint16_t ss_next; /* ix of next chan to scan */
+ uint16_t ss_last; /* ix+1 of last chan to scan */
unsigned long ss_mindwell; /* min dwell on channel */
unsigned long ss_maxdwell; /* max dwell on channel */
};
@@ -98,13 +98,13 @@
void ieee80211_scan_timeout(struct ieee80211com *);
void ieee80211_scan_assoc_success(struct ieee80211com *,
- const u_int8_t mac[IEEE80211_ADDR_LEN]);
+ const uint8_t mac[IEEE80211_ADDR_LEN]);
enum {
IEEE80211_SCAN_FAIL_TIMEOUT = 1, /* no response to mgmt frame */
IEEE80211_SCAN_FAIL_STATUS = 2 /* negative response to " " */
};
void ieee80211_scan_assoc_fail(struct ieee80211com *,
- const u_int8_t mac[IEEE80211_ADDR_LEN], int reason);
+ const uint8_t mac[IEEE80211_ADDR_LEN], int reason);
void ieee80211_scan_flush(struct ieee80211com *);
struct ieee80211_scan_entry;
@@ -121,27 +121,27 @@
* All multi-byte values must be in host byte order.
*/
struct ieee80211_scanparams {
- u_int16_t capinfo; /* 802.11 capabilities */
- u_int16_t fhdwell; /* FHSS dwell interval */
- u_int8_t chan; /* */
- u_int8_t bchan;
- u_int8_t fhindex;
- u_int8_t erp;
- u_int16_t bintval;
- u_int8_t timoff;
- u_int8_t *tim;
- u_int8_t *tstamp;
- u_int8_t *country;
- u_int8_t *ssid;
- u_int8_t *rates;
- u_int8_t *xrates;
- u_int8_t *doth;
- u_int8_t *wpa;
- u_int8_t *rsn;
- u_int8_t *wme;
- u_int8_t *htcap;
- u_int8_t *htinfo;
- u_int8_t *ath;
+ uint16_t capinfo; /* 802.11 capabilities */
+ uint16_t fhdwell; /* FHSS dwell interval */
+ uint8_t chan; /* */
+ uint8_t bchan;
+ uint8_t fhindex;
+ uint8_t erp;
+ uint16_t bintval;
+ uint8_t timoff;
+ uint8_t *tim;
+ uint8_t *tstamp;
+ uint8_t *country;
+ uint8_t *ssid;
+ uint8_t *rates;
+ uint8_t *xrates;
+ uint8_t *doth;
+ uint8_t *wpa;
+ uint8_t *rsn;
+ uint8_t *wme;
+ uint8_t *htcap;
+ uint8_t *htinfo;
+ uint8_t *ath;
};
/*
@@ -149,32 +149,32 @@
* module; this data may be represented some other way internally.
*/
struct ieee80211_scan_entry {
- u_int8_t se_macaddr[IEEE80211_ADDR_LEN];
- u_int8_t se_bssid[IEEE80211_ADDR_LEN];
- u_int8_t se_ssid[2+IEEE80211_NWID_LEN];
- u_int8_t se_rates[2+IEEE80211_RATE_MAXSIZE];
- u_int8_t se_xrates[2+IEEE80211_RATE_MAXSIZE];
- u_int32_t se_rstamp; /* recv timestamp */
+ uint8_t se_macaddr[IEEE80211_ADDR_LEN];
+ uint8_t se_bssid[IEEE80211_ADDR_LEN];
+ uint8_t se_ssid[2+IEEE80211_NWID_LEN];
+ uint8_t se_rates[2+IEEE80211_RATE_MAXSIZE];
+ uint8_t se_xrates[2+IEEE80211_RATE_MAXSIZE];
+ uint32_t se_rstamp; /* recv timestamp */
union {
- u_int8_t data[8];
- u_int64_t tsf;
+ uint8_t data[8];
+ uint64_t tsf;
} se_tstamp; /* from last rcv'd beacon */
- u_int16_t se_intval; /* beacon interval (host byte order) */
- u_int16_t se_capinfo; /* capabilities (host byte order) */
+ uint16_t se_intval; /* beacon interval (host byte order) */
+ uint16_t se_capinfo; /* capabilities (host byte order) */
struct ieee80211_channel *se_chan;/* channel where sta found */
- u_int16_t se_timoff; /* byte offset to TIM ie */
- u_int16_t se_fhdwell; /* FH only (host byte order) */
- u_int8_t se_fhindex; /* FH only */
- u_int8_t se_erp; /* ERP from beacon/probe resp */
+ uint16_t se_timoff; /* byte offset to TIM ie */
+ uint16_t se_fhdwell; /* FH only (host byte order) */
+ uint8_t se_fhindex; /* FH only */
+ uint8_t se_erp; /* ERP from beacon/probe resp */
int8_t se_rssi; /* avg'd recv ssi */
int8_t se_noise; /* noise floor */
- u_int8_t se_dtimperiod; /* DTIM period */
- u_int8_t *se_wpa_ie; /* captured WPA ie */
- u_int8_t *se_rsn_ie; /* captured RSN ie */
- u_int8_t *se_wme_ie; /* captured WME ie */
- u_int8_t *se_htcap_ie; /* captured HTP cap ie */
- u_int8_t *se_htinfo_ie; /* captured HTP info ie */
- u_int8_t *se_ath_ie; /* captured Atheros ie */
+ uint8_t se_dtimperiod; /* DTIM period */
+ uint8_t *se_wpa_ie; /* captured WPA ie */
+ uint8_t *se_rsn_ie; /* captured RSN ie */
+ uint8_t *se_wme_ie; /* captured WME ie */
+ uint8_t *se_htcap_ie; /* captured HTP cap ie */
+ uint8_t *se_htinfo_ie; /* captured HTP info ie */
+ uint8_t *se_ath_ie; /* captured Atheros ie */
u_int se_age; /* age of entry (0 on create) */
};
MALLOC_DECLARE(M_80211_SCAN);
@@ -206,11 +206,11 @@
void (*scan_age)(struct ieee80211_scan_state *);
/* note that association failed for an entry */
void (*scan_assoc_fail)(struct ieee80211_scan_state *,
- const u_int8_t macaddr[IEEE80211_ADDR_LEN],
+ const uint8_t macaddr[IEEE80211_ADDR_LEN],
int reason);
/* note that association succeed for an entry */
void (*scan_assoc_success)(struct ieee80211_scan_state *,
- const u_int8_t macaddr[IEEE80211_ADDR_LEN]);
+ const uint8_t macaddr[IEEE80211_ADDR_LEN]);
/* iterate over entries in the scan cache */
void (*scan_iterate)(struct ieee80211_scan_state *,
ieee80211_scan_iter_func *, void *);
==== //depot/projects/wifi/sys/net80211/ieee80211_scan_ap.c#7 (text+ko) ====
@@ -351,14 +351,14 @@
static void
ap_assoc_success(struct ieee80211_scan_state *ss,
- const u_int8_t macaddr[IEEE80211_ADDR_LEN])
+ const uint8_t macaddr[IEEE80211_ADDR_LEN])
{
/* should not be called */
}
static void
ap_assoc_fail(struct ieee80211_scan_state *ss,
- const u_int8_t macaddr[IEEE80211_ADDR_LEN], int reason)
+ const uint8_t macaddr[IEEE80211_ADDR_LEN], int reason)
{
/* should not be called */
}
==== //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#19 (text+ko) ====
@@ -83,13 +83,13 @@
struct ieee80211_scan_entry base;
TAILQ_ENTRY(sta_entry) se_list;
LIST_ENTRY(sta_entry) se_hash;
- u_int8_t se_fails; /* failure to associate count */
- u_int8_t se_seen; /* seen during current scan */
- u_int8_t se_notseen; /* not seen in previous scans */
- u_int8_t se_flags;
+ uint8_t se_fails; /* failure to associate count */
+ uint8_t se_seen; /* seen during current scan */
+ uint8_t se_notseen; /* not seen in previous scans */
+ uint8_t se_flags;
#define STA_SSID_MATCH 0x01
#define STA_BSSID_MATCH 0x02
- u_int32_t se_avgrssi; /* LPF rssi state */
+ uint32_t se_avgrssi; /* LPF rssi state */
unsigned long se_lastupdate; /* time of last update */
unsigned long se_lastfail; /* time of last failure */
unsigned long se_lastassoc; /* time of last association */
@@ -99,7 +99,7 @@
#define STA_HASHSIZE 32
/* simple hash is enough for variation of macaddr */
#define STA_HASH(addr) \
- (((const u_int8_t *)(addr))[IEEE80211_ADDR_LEN - 1] % STA_HASHSIZE)
+ (((const uint8_t *)(addr))[IEEE80211_ADDR_LEN - 1] % STA_HASHSIZE)
struct sta_table {
struct mtx st_lock; /* on scan table */
@@ -187,7 +187,7 @@
}
static void
-saveie(u_int8_t **iep, const u_int8_t *ie)
+saveie(uint8_t **iep, const uint8_t *ie)
{
if (ie == NULL)
@@ -211,7 +211,7 @@
((ss->ss_flags & (IEEE80211_SCAN_PICK1ST | IEEE80211_SCAN_GOTPICK)) == \
IEEE80211_SCAN_PICK1ST)
struct sta_table *st = ss->ss_priv;
- const u_int8_t *macaddr = wh->i_addr2;
+ const uint8_t *macaddr = wh->i_addr2;
struct ieee80211com *ic = ss->ss_ic;
struct sta_entry *se;
struct ieee80211_scan_entry *ise;
@@ -355,7 +355,7 @@
static void
add_channels(struct ieee80211com *ic,
struct ieee80211_scan_state *ss,
- enum ieee80211_phymode mode, const u_int16_t freq[], int nfreq)
+ enum ieee80211_phymode mode, const uint16_t freq[], int nfreq)
{
#define N(a) (sizeof(a) / sizeof(a[0]))
struct ieee80211_channel *c, *cg;
@@ -385,41 +385,41 @@
#undef N
}
-static const u_int16_t rcl1[] = /* 8 FCC channel: 52, 56, 60, 64, 36, 40, 44, 48 */
+static const uint16_t rcl1[] = /* 8 FCC channel: 52, 56, 60, 64, 36, 40, 44, 48 */
{ 5260, 5280, 5300, 5320, 5180, 5200, 5220, 5240 };
-static const u_int16_t rcl2[] = /* 4 MKK channels: 34, 38, 42, 46 */
+static const uint16_t rcl2[] = /* 4 MKK channels: 34, 38, 42, 46 */
{ 5170, 5190, 5210, 5230 };
-static const u_int16_t rcl3[] = /* 2.4Ghz ch: 1,6,11,7,13 */
+static const uint16_t rcl3[] = /* 2.4Ghz ch: 1,6,11,7,13 */
{ 2412, 2437, 2462, 2442, 2472 };
-static const u_int16_t rcl4[] = /* 5 FCC channel: 149, 153, 161, 165 */
+static const uint16_t rcl4[] = /* 5 FCC channel: 149, 153, 161, 165 */
{ 5745, 5765, 5785, 5805, 5825 };
-static const u_int16_t rcl7[] = /* 11 ETSI channel: 100,104,108,112,116,120,124,128,132,136,140 */
+static const uint16_t rcl7[] = /* 11 ETSI channel: 100,104,108,112,116,120,124,128,132,136,140 */
{ 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680, 5700 };
-static const u_int16_t rcl8[] = /* 2.4Ghz ch: 2,3,4,5,8,9,10,12 */
+static const uint16_t rcl8[] = /* 2.4Ghz ch: 2,3,4,5,8,9,10,12 */
{ 2417, 2422, 2427, 2432, 2447, 2452, 2457, 2467 };
-static const u_int16_t rcl9[] = /* 2.4Ghz ch: 14 */
+static const uint16_t rcl9[] = /* 2.4Ghz ch: 14 */
{ 2484 };
-static const u_int16_t rcl10[] = /* Added Korean channels 2312-2372 */
+static const uint16_t rcl10[] = /* Added Korean channels 2312-2372 */
{ 2312, 2317, 2322, 2327, 2332, 2337, 2342, 2347, 2352, 2357, 2362, 2367, 2372 };
-static const u_int16_t rcl11[] = /* Added Japan channels in 4.9/5.0 spectrum */
+static const uint16_t rcl11[] = /* Added Japan channels in 4.9/5.0 spectrum */
{ 5040, 5060, 5080, 4920, 4940, 4960, 4980 };
#ifdef ATH_TURBO_SCAN
-static const u_int16_t rcl5[] = /* 3 static turbo channels */
+static const uint16_t rcl5[] = /* 3 static turbo channels */
{ 5210, 5250, 5290 };
-static const u_int16_t rcl6[] = /* 2 static turbo channels */
+static const uint16_t rcl6[] = /* 2 static turbo channels */
{ 5760, 5800 };
-static const u_int16_t rcl6x[] = /* 4 FCC3 turbo channels */
+static const uint16_t rcl6x[] = /* 4 FCC3 turbo channels */
{ 5540, 5580, 5620, 5660 };
-static const u_int16_t rcl12[] = /* 2.4Ghz Turbo channel 6 */
+static const uint16_t rcl12[] = /* 2.4Ghz Turbo channel 6 */
{ 2437 };
-static const u_int16_t rcl13[] = /* dynamic Turbo channels */
+static const uint16_t rcl13[] = /* dynamic Turbo channels */
{ 5200, 5240, 5280, 5765, 5805 };
#endif /* ATH_TURBO_SCAN */
struct scanlist {
- u_int16_t mode;
- u_int16_t count;
- const u_int16_t *list;
+ uint16_t mode;
+ uint16_t count;
+ const uint16_t *list;
};
#define X(a) .count = sizeof(a)/sizeof(a[0]), .list = a
@@ -605,10 +605,10 @@
return 0;
}
-static u_int8_t
+static uint8_t
maxrate(const struct ieee80211_scan_entry *se)
{
- u_int8_t rmax, r;
+ uint8_t rmax, r;
int i;
rmax = 0;
@@ -639,7 +639,7 @@
if (((_a) ^ (_b)) & (_what)) \
return ((_a) & (_what)) ? 1 : -1; \
} while (0)
- u_int8_t maxa, maxb;
+ uint8_t maxa, maxb;
int8_t rssia, rssib;
int weight;
@@ -695,7 +695,7 @@
#define RV(v) ((v) & IEEE80211_RATE_VAL)
const struct ieee80211_rateset *srs;
int i, j, nrs, r, okrate, badrate, fixedrate;
- const u_int8_t *rs;
+ const uint8_t *rs;
okrate = badrate = fixedrate = 0;
@@ -747,7 +747,7 @@
}
static int
-match_ssid(const u_int8_t *ie,
+match_ssid(const uint8_t *ie,
int nssid, const struct ieee80211_scan_ssid ssids[])
{
int i;
@@ -769,8 +769,8 @@
int debug)
{
struct ieee80211_scan_entry *se = &se0->base;
- u_int8_t rate;
- int fail;
+ uint8_t rate;
+ int fail;
fail = 0;
if (isclr(ic->ic_chan_active, ieee80211_chan2ieee(ic, se->se_chan)))
@@ -963,7 +963,7 @@
* a reference to an entry w/o holding the lock on the table.
*/
static struct sta_entry *
-sta_lookup(struct sta_table *st, const u_int8_t macaddr[IEEE80211_ADDR_LEN])
+sta_lookup(struct sta_table *st, const uint8_t macaddr[IEEE80211_ADDR_LEN])
{
struct sta_entry *se;
int hash = STA_HASH(macaddr);
@@ -983,7 +983,7 @@
struct ieee80211_node *ni = ic->ic_bss;
struct sta_table *st = ss->ss_priv;
struct sta_entry *se, *selbs;
- u_int8_t roamRate, curRate;
+ uint8_t roamRate, curRate;
int8_t roamRssi, curRssi;
se = sta_lookup(st, ni->ni_macaddr);
@@ -1118,7 +1118,7 @@
static void
sta_assoc_fail(struct ieee80211_scan_state *ss,
- const u_int8_t macaddr[IEEE80211_ADDR_LEN], int reason)
+ const uint8_t macaddr[IEEE80211_ADDR_LEN], int reason)
{
struct sta_table *st = ss->ss_priv;
struct sta_entry *se;
@@ -1135,7 +1135,7 @@
static void
sta_assoc_success(struct ieee80211_scan_state *ss,
- const u_int8_t macaddr[IEEE80211_ADDR_LEN])
+ const uint8_t macaddr[IEEE80211_ADDR_LEN])
{
struct sta_table *st = ss->ss_priv;
struct sta_entry *se;
@@ -1172,13 +1172,13 @@
* Adhoc mode-specific support.
*/
-static const u_int16_t adhocWorld[] = /* 36, 40, 44, 48 */
+static const uint16_t adhocWorld[] = /* 36, 40, 44, 48 */
{ 5180, 5200, 5220, 5240 };
-static const u_int16_t adhocFcc3[] = /* 36, 40, 44, 48 145, 149, 153, 157, 161, 165 */
+static const uint16_t adhocFcc3[] = /* 36, 40, 44, 48 145, 149, 153, 157, 161, 165 */
{ 5180, 5200, 5220, 5240, 5725, 5745, 5765, 5785, 5805, 5825 };
-static const u_int16_t adhocMkk[] = /* 34, 38, 42, 46 */
+static const uint16_t adhocMkk[] = /* 34, 38, 42, 46 */
{ 5170, 5190, 5210, 5230 };
-static const u_int16_t adhoc11b[] = /* 10, 11 */
+static const uint16_t adhoc11b[] = /* 10, 11 */
{ 2457, 2462 };
static const struct scanlist adhocScanTable[] = {
More information about the p4-projects
mailing list