Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 May 2007 05:03:30 GMT
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 119752 for review
Message-ID:  <200705130503.l4D53U9V051538@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=119752

Change 119752 by sephe@sephe_zealot:sam_wifi on 2007/05/13 05:02:36

	u_intX_t -> uintX_t
	
	Approved by:	sam

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#74 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#74 (text+ko) ====

@@ -99,9 +99,9 @@
 	struct ieee80211_node *ni,
 	struct ieee80211_frame *wh,
 	int type,
-	const u_int8_t sa[IEEE80211_ADDR_LEN],
-	const u_int8_t da[IEEE80211_ADDR_LEN],
-	const u_int8_t bssid[IEEE80211_ADDR_LEN])
+	const uint8_t sa[IEEE80211_ADDR_LEN],
+	const uint8_t da[IEEE80211_ADDR_LEN],
+	const uint8_t bssid[IEEE80211_ADDR_LEN])
 {
 #define	WH4(wh)	((struct ieee80211_frame_addr4 *)wh)
 
@@ -144,9 +144,9 @@
 		IEEE80211_ADDR_COPY(wh->i_addr2, sa);
 		IEEE80211_ADDR_COPY(wh->i_addr3, bssid);
 	}
-	*(u_int16_t *)&wh->i_dur[0] = 0;
+	*(uint16_t *)&wh->i_dur[0] = 0;
 	/* NB: use non-QoS tid */
-	*(u_int16_t *)&wh->i_seq[0] =
+	*(uint16_t *)&wh->i_seq[0] =
 	    htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT);
 	ni->ni_txseqs[IEEE80211_NONQOS_TID]++;
 #undef WH4
@@ -450,7 +450,7 @@
 	eh = mtod(m, struct ether_header *);
 	if (eh->ether_type == htons(ETHERTYPE_IP)) {
 		const struct ip *ip = (struct ip *)
-			(mtod(m, u_int8_t *) + sizeof (*eh));
+			(mtod(m, uint8_t *) + sizeof (*eh));
 		/*
 		 * IP frame, map the TOS field.
 		 */
@@ -687,7 +687,7 @@
 	else
 		hdrsize = sizeof(struct ieee80211_frame);
 	if (ic->ic_flags & IEEE80211_F_DATAPAD)
-		hdrsize = roundup(hdrsize, sizeof(u_int32_t));
+		hdrsize = roundup(hdrsize, sizeof(uint32_t));
 
 	if ((isff = m->m_flags & M_FF) != 0) {
 		struct mbuf *m2;
@@ -712,7 +712,7 @@
 		 * ieee80211_encap_fastframe will do.
 		 */
 		m = ieee80211_mbuf_adjust(ic,
-			hdrsize + sizeof(struct llc) + sizeof(u_int32_t) + 2 +
+			hdrsize + sizeof(struct llc) + sizeof(uint32_t) + 2 +
 			    sizeof(struct ether_header),
 			key, m);
 		if (m == NULL) {
@@ -766,7 +766,7 @@
 	}
 	wh = mtod(m, struct ieee80211_frame *);
 	wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_DATA;
-	*(u_int16_t *)wh->i_dur = 0;
+	*(uint16_t *)wh->i_dur = 0;
 	switch (ic->ic_opmode) {
 	case IEEE80211_M_STA:
 		wh->i_fc[1] = IEEE80211_FC1_DIR_TODS;
@@ -840,11 +840,11 @@
 		qwh->i_qos[1] = 0;
 		qwh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS;
 
-		*(u_int16_t *)wh->i_seq =
+		*(uint16_t *)wh->i_seq =
 		    htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT);
 		ni->ni_txseqs[tid]++;
 	} else {
-		*(u_int16_t *)wh->i_seq =
+		*(uint16_t *)wh->i_seq =
 		    htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT);
 		ni->ni_txseqs[IEEE80211_NONQOS_TID]++;
 	}
@@ -908,7 +908,7 @@
 	const struct ether_header *eh)
 {
 	struct llc *llc;
-	u_int16_t payload;
+	uint16_t payload;
 
 	/* XXX optimize by combining m_adj+M_PREPEND */
 	m_adj(m, sizeof(struct ether_header) - sizeof(struct llc));
@@ -996,14 +996,14 @@
 	 */
 	m->m_next = m2;			/* NB: last mbuf from above */
 	m1->m_pkthdr.len += m2->m_pkthdr.len;
-	M_PREPEND(m1, sizeof(u_int32_t)+2, M_DONTWAIT);
+	M_PREPEND(m1, sizeof(uint32_t)+2, M_DONTWAIT);
 	if (m1 == NULL) {		/* XXX cannot happen */
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_SUPERG,
 			"%s: no space for tunnel header\n", __func__);
 		ic->ic_stats.is_tx_nobuf++;
 		return NULL;
 	}
-	memset(mtod(m1, void *), 0, sizeof(u_int32_t)+2);
+	memset(mtod(m1, void *), 0, sizeof(uint32_t)+2);
 
 	M_PREPEND(m1, sizeof(struct llc), M_DONTWAIT);
 	if (m1 == NULL) {		/* XXX cannot happen */
@@ -1076,14 +1076,14 @@
 		 */
 		whf = mtod(m, struct ieee80211_frame *);
 		memcpy(whf, wh, hdrsize);
-		*(u_int16_t *)&whf->i_seq[0] |= htole16(
+		*(uint16_t *)&whf->i_seq[0] |= htole16(
 			(fragno & IEEE80211_SEQ_FRAG_MASK) <<
 				IEEE80211_SEQ_FRAG_SHIFT);
 		fragno++;
 
 		payload = fragsize - totalhdrsize;
 		/* NB: destination is known to be contiguous */
-		m_copydata(m0, off, payload, mtod(m, u_int8_t *) + hdrsize);
+		m_copydata(m0, off, payload, mtod(m, uint8_t *) + hdrsize);
 		m->m_len = hdrsize + payload;
 		m->m_pkthdr.len = hdrsize + payload;
 		m->m_flags |= M_FRAG;
@@ -1120,8 +1120,8 @@
 /*
  * Add a supported rates element id to a frame.
  */
-static u_int8_t *
-ieee80211_add_rates(u_int8_t *frm, const struct ieee80211_rateset *rs)
+static uint8_t *
+ieee80211_add_rates(uint8_t *frm, const struct ieee80211_rateset *rs)
 {
 	int nrates;
 
@@ -1137,8 +1137,8 @@
 /*
  * Add an extended supported rates element id to a frame.
  */
-static u_int8_t *
-ieee80211_add_xrates(u_int8_t *frm, const struct ieee80211_rateset *rs)
+static uint8_t *
+ieee80211_add_xrates(uint8_t *frm, const struct ieee80211_rateset *rs)
 {
 	/*
 	 * Add an extended supported rates element if operating in 11g mode.
@@ -1156,8 +1156,8 @@
 /* 
  * Add an ssid elemet to a frame.
  */
-static u_int8_t *
-ieee80211_add_ssid(u_int8_t *frm, const u_int8_t *ssid, u_int len)
+static uint8_t *
+ieee80211_add_ssid(uint8_t *frm, const uint8_t *ssid, u_int len)
 {
 	*frm++ = IEEE80211_ELEMID_SSID;
 	*frm++ = len;
@@ -1168,10 +1168,10 @@
 /*
  * Add an erp element to a frame.
  */
-static u_int8_t *
-ieee80211_add_erp(u_int8_t *frm, struct ieee80211com *ic)
+static uint8_t *
+ieee80211_add_erp(uint8_t *frm, struct ieee80211com *ic)
 {
-	u_int8_t erp;
+	uint8_t erp;
 
 	*frm++ = IEEE80211_ELEMID_ERP;
 	*frm++ = 1;
@@ -1186,8 +1186,8 @@
 	return frm;
 }
 
-static u_int8_t *
-ieee80211_setup_wpa_ie(struct ieee80211com *ic, u_int8_t *ie)
+static uint8_t *
+ieee80211_setup_wpa_ie(struct ieee80211com *ic, uint8_t *ie)
 {
 #define	WPA_OUI_BYTES		0x00, 0x50, 0xf2
 #define	ADDSHORT(frm, v) do {			\
@@ -1199,8 +1199,8 @@
 	memcpy(frm, sel, 4);			\
 	frm += 4;				\
 } while (0)
-	static const u_int8_t oui[4] = { WPA_OUI_BYTES, WPA_OUI_TYPE };
-	static const u_int8_t cipher_suite[][4] = {
+	static const uint8_t oui[4] = { WPA_OUI_BYTES, WPA_OUI_TYPE };
+	static const uint8_t cipher_suite[][4] = {
 		{ WPA_OUI_BYTES, WPA_CSE_WEP40 },	/* NB: 40-bit */
 		{ WPA_OUI_BYTES, WPA_CSE_TKIP },
 		{ 0x00, 0x00, 0x00, 0x00 },		/* XXX WRAP */
@@ -1208,15 +1208,15 @@
 		{ 0x00, 0x00, 0x00, 0x00 },		/* XXX CKIP */
 		{ WPA_OUI_BYTES, WPA_CSE_NULL },
 	};
-	static const u_int8_t wep104_suite[4] =
+	static const uint8_t wep104_suite[4] =
 		{ WPA_OUI_BYTES, WPA_CSE_WEP104 };
-	static const u_int8_t key_mgt_unspec[4] =
+	static const uint8_t key_mgt_unspec[4] =
 		{ WPA_OUI_BYTES, WPA_ASE_8021X_UNSPEC };
-	static const u_int8_t key_mgt_psk[4] =
+	static const uint8_t key_mgt_psk[4] =
 		{ WPA_OUI_BYTES, WPA_ASE_8021X_PSK };
 	const struct ieee80211_rsnparms *rsn = &ic->ic_bss->ni_rsn;
-	u_int8_t *frm = ie;
-	u_int8_t *selcnt;
+	uint8_t *frm = ie;
+	uint8_t *selcnt;
 
 	*frm++ = IEEE80211_ELEMID_VENDOR;
 	*frm++ = 0;				/* length filled in below */
@@ -1272,8 +1272,8 @@
 #undef WPA_OUI_BYTES
 }
 
-static u_int8_t *
-ieee80211_setup_rsn_ie(struct ieee80211com *ic, u_int8_t *ie)
+static uint8_t *
+ieee80211_setup_rsn_ie(struct ieee80211com *ic, uint8_t *ie)
 {
 #define	RSN_OUI_BYTES		0x00, 0x0f, 0xac
 #define	ADDSHORT(frm, v) do {			\
@@ -1285,7 +1285,7 @@
 	memcpy(frm, sel, 4);			\
 	frm += 4;				\
 } while (0)
-	static const u_int8_t cipher_suite[][4] = {
+	static const uint8_t cipher_suite[][4] = {
 		{ RSN_OUI_BYTES, RSN_CSE_WEP40 },	/* NB: 40-bit */
 		{ RSN_OUI_BYTES, RSN_CSE_TKIP },
 		{ RSN_OUI_BYTES, RSN_CSE_WRAP },
@@ -1293,15 +1293,15 @@
 		{ 0x00, 0x00, 0x00, 0x00 },		/* XXX CKIP */
 		{ RSN_OUI_BYTES, RSN_CSE_NULL },
 	};
-	static const u_int8_t wep104_suite[4] =
+	static const uint8_t wep104_suite[4] =
 		{ RSN_OUI_BYTES, RSN_CSE_WEP104 };
-	static const u_int8_t key_mgt_unspec[4] =
+	static const uint8_t key_mgt_unspec[4] =
 		{ RSN_OUI_BYTES, RSN_ASE_8021X_UNSPEC };
-	static const u_int8_t key_mgt_psk[4] =
+	static const uint8_t key_mgt_psk[4] =
 		{ RSN_OUI_BYTES, RSN_ASE_8021X_PSK };
 	const struct ieee80211_rsnparms *rsn = &ic->ic_bss->ni_rsn;
-	u_int8_t *frm = ie;
-	u_int8_t *selcnt;
+	uint8_t *frm = ie;
+	uint8_t *selcnt;
 
 	*frm++ = IEEE80211_ELEMID_RSN;
 	*frm++ = 0;				/* length filled in below */
@@ -1358,8 +1358,8 @@
 /*
  * Add a WPA/RSN element to a frame.
  */
-static u_int8_t *
-ieee80211_add_wpa(u_int8_t *frm, struct ieee80211com *ic)
+static uint8_t *
+ieee80211_add_wpa(uint8_t *frm, struct ieee80211com *ic)
 {
 
 	KASSERT(ic->ic_flags & IEEE80211_F_WPA, ("no WPA/RSN!"));
@@ -1374,8 +1374,8 @@
 /*
  * Add a WME information element to a frame.
  */
-static u_int8_t *
-ieee80211_add_wme_info(u_int8_t *frm, struct ieee80211_wme_state *wme)
+static uint8_t *
+ieee80211_add_wme_info(uint8_t *frm, struct ieee80211_wme_state *wme)
 {
 	static const struct ieee80211_wme_info info = {
 		.wme_id		= IEEE80211_ELEMID_VENDOR,
@@ -1393,8 +1393,8 @@
 /*
  * Add a WME parameters element to a frame.
  */
-static u_int8_t *
-ieee80211_add_wme_param(u_int8_t *frm, struct ieee80211_wme_state *wme)
+static uint8_t *
+ieee80211_add_wme_param(uint8_t *frm, struct ieee80211_wme_state *wme)
 {
 #define	SM(_v, _f)	(((_v) << _f##_S) & _f)
 #define	ADDSHORT(frm, v) do {			\
@@ -1439,8 +1439,8 @@
 /*
  * Add a WME information element to a frame.
  */
-static u_int8_t *
-ieee80211_add_ath(u_int8_t *frm, u_int8_t caps, u_int16_t defkeyix)
+static uint8_t *
+ieee80211_add_ath(uint8_t *frm, uint8_t caps, uint16_t defkeyix)
 {
 	static const struct ieee80211_ath_ie info = {
 		.ath_id		= IEEE80211_ELEMID_VENDOR,
@@ -1466,17 +1466,17 @@
  */
 int
 ieee80211_send_probereq(struct ieee80211_node *ni,
-	const u_int8_t sa[IEEE80211_ADDR_LEN],
-	const u_int8_t da[IEEE80211_ADDR_LEN],
-	const u_int8_t bssid[IEEE80211_ADDR_LEN],
-	const u_int8_t *ssid, size_t ssidlen,
+	const uint8_t sa[IEEE80211_ADDR_LEN],
+	const uint8_t da[IEEE80211_ADDR_LEN],
+	const uint8_t bssid[IEEE80211_ADDR_LEN],
+	const uint8_t *ssid, size_t ssidlen,
 	const void *optie, size_t optielen)
 {
 	struct ieee80211com *ic = ni->ni_ic;
 	struct ieee80211_frame *wh;
 	const struct ieee80211_rateset *rs;
 	struct mbuf *m;
-	u_int8_t *frm;
+	uint8_t *frm;
 
 	/*
 	 * Hold a reference on the node so it doesn't go away until after
@@ -1519,7 +1519,7 @@
 		memcpy(frm, optie, optielen);
 		frm += optielen;
 	}
-	m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *);
+	m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
 
 	M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
 	if (m == NULL)
@@ -1549,10 +1549,10 @@
 /*
  * Calculate capability information for mgt frames.
  */
-static u_int16_t
+static uint16_t
 getcapinfo(struct ieee80211com *ic, struct ieee80211_channel *chan)
 {
-	u_int16_t capinfo;
+	uint16_t capinfo;
 
 	KASSERT(ic->ic_opmode != IEEE80211_M_STA, ("station mode"));
 
@@ -1583,8 +1583,8 @@
 {
 #define	senderr(_x, _v)	do { ic->ic_stats._v++; ret = _x; goto bad; } while (0)
 	struct mbuf *m;
-	u_int8_t *frm;
-	u_int16_t capinfo;
+	uint8_t *frm;
+	uint16_t capinfo;
 	int has_challenge, is_shared_key, ret, status;
 
 	KASSERT(ni != NULL, ("null node"));
@@ -1625,8 +1625,8 @@
 		m = ieee80211_getmgtframe(&frm,
 			 ic->ic_headroom + sizeof(struct ieee80211_frame),
 			 8
-		       + sizeof(u_int16_t)
-		       + sizeof(u_int16_t)
+		       + sizeof(uint16_t)
+		       + sizeof(uint16_t)
 		       + 2 + IEEE80211_NWID_LEN
 		       + 2 + IEEE80211_RATE_SIZE
 		       + 7	/* max(7,3) */
@@ -1647,10 +1647,10 @@
 
 		memset(frm, 0, 8);	/* timestamp should be filled later */
 		frm += 8;
-		*(u_int16_t *)frm = htole16(ic->ic_bss->ni_intval);
+		*(uint16_t *)frm = htole16(ic->ic_bss->ni_intval);
 		frm += 2;
 		capinfo = getcapinfo(ic, ic->ic_curchan);
-		*(u_int16_t *)frm = htole16(capinfo);
+		*(uint16_t *)frm = htole16(capinfo);
 		frm += 2;
 
 		frm = ieee80211_add_ssid(frm, ic->ic_bss->ni_essid,
@@ -1696,7 +1696,7 @@
 		if (ni->ni_ath_ie != NULL)
 			frm = ieee80211_add_ath(frm, ni->ni_ath_flags,
 				ni->ni_ath_defkeyix);
-		m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *);
+		m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
 		break;
 
 	case IEEE80211_FC0_SUBTYPE_AUTH:
@@ -1720,27 +1720,27 @@
 
 		m = ieee80211_getmgtframe(&frm,
 			  ic->ic_headroom + sizeof(struct ieee80211_frame),
-			  3 * sizeof(u_int16_t)
+			  3 * sizeof(uint16_t)
 			+ (has_challenge && status == IEEE80211_STATUS_SUCCESS ?
-				sizeof(u_int16_t)+IEEE80211_CHALLENGE_LEN : 0)
+				sizeof(uint16_t)+IEEE80211_CHALLENGE_LEN : 0)
 		);
 		if (m == NULL)
 			senderr(ENOMEM, is_tx_nobuf);
 
-		((u_int16_t *)frm)[0] =
+		((uint16_t *)frm)[0] =
 		    (is_shared_key) ? htole16(IEEE80211_AUTH_ALG_SHARED)
 		                    : htole16(IEEE80211_AUTH_ALG_OPEN);
-		((u_int16_t *)frm)[1] = htole16(arg);	/* sequence number */
-		((u_int16_t *)frm)[2] = htole16(status);/* status */
+		((uint16_t *)frm)[1] = htole16(arg);	/* sequence number */
+		((uint16_t *)frm)[2] = htole16(status);/* status */
 
 		if (has_challenge && status == IEEE80211_STATUS_SUCCESS) {
-			((u_int16_t *)frm)[3] =
+			((uint16_t *)frm)[3] =
 			    htole16((IEEE80211_CHALLENGE_LEN << 8) |
 			    IEEE80211_ELEMID_CHALLENGE);
-			memcpy(&((u_int16_t *)frm)[4], ni->ni_challenge,
+			memcpy(&((uint16_t *)frm)[4], ni->ni_challenge,
 			    IEEE80211_CHALLENGE_LEN);
 			m->m_pkthdr.len = m->m_len =
-				4 * sizeof(u_int16_t) + IEEE80211_CHALLENGE_LEN;
+				4 * sizeof(uint16_t) + IEEE80211_CHALLENGE_LEN;
 			if (arg == IEEE80211_AUTH_SHARED_RESPONSE) {
 				IEEE80211_DPRINTF(ic, IEEE80211_MSG_AUTH,
 				    "[%s] request encrypt frame (%s)\n",
@@ -1748,7 +1748,7 @@
 				m->m_flags |= M_LINK0; /* WEP-encrypt, please */
 			}
 		} else
-			m->m_pkthdr.len = m->m_len = 3 * sizeof(u_int16_t);
+			m->m_pkthdr.len = m->m_len = 3 * sizeof(uint16_t);
 
 		/* XXX not right for shared key */
 		if (status == IEEE80211_STATUS_SUCCESS)
@@ -1767,11 +1767,11 @@
 			ether_sprintf(ni->ni_macaddr), arg);
 		m = ieee80211_getmgtframe(&frm,
 			ic->ic_headroom + sizeof(struct ieee80211_frame),
-			sizeof(u_int16_t));
+			sizeof(uint16_t));
 		if (m == NULL)
 			senderr(ENOMEM, is_tx_nobuf);
-		*(u_int16_t *)frm = htole16(arg);	/* reason */
-		m->m_pkthdr.len = m->m_len = sizeof(u_int16_t);
+		*(uint16_t *)frm = htole16(arg);	/* reason */
+		m->m_pkthdr.len = m->m_len = sizeof(uint16_t);
 
 		IEEE80211_NODE_STAT(ni, tx_deauth);
 		IEEE80211_NODE_STAT_SET(ni, tx_deauth_code, arg);
@@ -1797,8 +1797,8 @@
 		 */
 		m = ieee80211_getmgtframe(&frm,
 			 ic->ic_headroom + sizeof(struct ieee80211_frame),
-			 sizeof(u_int16_t)
-		       + sizeof(u_int16_t)
+			 sizeof(uint16_t)
+		       + sizeof(uint16_t)
 		       + IEEE80211_ADDR_LEN
 		       + 2 + IEEE80211_NWID_LEN
 		       + 2 + IEEE80211_RATE_SIZE
@@ -1826,13 +1826,13 @@
 		if (IEEE80211_IS_CHAN_ANYG(ic->ic_curchan) &&
 		    (ic->ic_caps & IEEE80211_C_SHSLOT))
 			capinfo |= IEEE80211_CAPINFO_SHORT_SLOTTIME;
-		*(u_int16_t *)frm = htole16(capinfo);
+		*(uint16_t *)frm = htole16(capinfo);
 		frm += 2;
 
 		KASSERT(ic->ic_bss->ni_intval != 0,
 			("beacon interval is zero!"));
-		*(u_int16_t *)frm = htole16(howmany(ic->ic_lintval,
-						    ic->ic_bss->ni_intval));
+		*(uint16_t *)frm = htole16(howmany(ic->ic_lintval,
+						   ic->ic_bss->ni_intval));
 		frm += 2;
 
 		if (type == IEEE80211_FC0_SUBTYPE_REASSOC_REQ) {
@@ -1861,7 +1861,7 @@
 			memcpy(frm, ic->ic_opt_ie, ic->ic_opt_ie_len);
 			frm += ic->ic_opt_ie_len;
 		}
-		m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *);
+		m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
 
 		ieee80211_add_callback(m, ieee80211_tx_mgt_cb,
 			(void *) ic->ic_state);
@@ -1883,9 +1883,9 @@
 		 */
 		m = ieee80211_getmgtframe(&frm,
 			 ic->ic_headroom + sizeof(struct ieee80211_frame),
-			 sizeof(u_int16_t)
-		       + sizeof(u_int16_t)
-		       + sizeof(u_int16_t)
+			 sizeof(uint16_t)
+		       + sizeof(uint16_t)
+		       + sizeof(uint16_t)
 		       + 2 + IEEE80211_RATE_SIZE
 		       + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)
 		       + sizeof(struct ieee80211_wme_param)
@@ -1897,14 +1897,14 @@
 			senderr(ENOMEM, is_tx_nobuf);
 
 		capinfo = getcapinfo(ic, ic->ic_curchan);
-		*(u_int16_t *)frm = htole16(capinfo);
+		*(uint16_t *)frm = htole16(capinfo);
 		frm += 2;
 
-		*(u_int16_t *)frm = htole16(arg);	/* status */
+		*(uint16_t *)frm = htole16(arg);	/* status */
 		frm += 2;
 
 		if (arg == IEEE80211_STATUS_SUCCESS) {
-			*(u_int16_t *)frm = htole16(ni->ni_associd);
+			*(uint16_t *)frm = htole16(ni->ni_associd);
 			IEEE80211_NODE_STAT(ni, tx_assoc);
 		} else
 			IEEE80211_NODE_STAT(ni, tx_assoc_fail);
@@ -1928,7 +1928,7 @@
 			frm = ieee80211_add_ath(frm,
 				IEEE80211_ATH_CAP(ic, ni, IEEE80211_F_ATHEROS),
 				ni->ni_ath_defkeyix);
-		m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *);
+		m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
 		break;
 
 	case IEEE80211_FC0_SUBTYPE_DISASSOC:
@@ -1937,11 +1937,11 @@
 			ether_sprintf(ni->ni_macaddr), arg);
 		m = ieee80211_getmgtframe(&frm,
 			ic->ic_headroom + sizeof(struct ieee80211_frame),
-			sizeof(u_int16_t));
+			sizeof(uint16_t));
 		if (m == NULL)
 			senderr(ENOMEM, is_tx_nobuf);
-		*(u_int16_t *)frm = htole16(arg);	/* reason */
-		m->m_pkthdr.len = m->m_len = sizeof(u_int16_t);
+		*(uint16_t *)frm = htole16(arg);	/* reason */
+		m->m_pkthdr.len = m->m_len = sizeof(uint16_t);
 
 		IEEE80211_NODE_STAT(ni, tx_disassoc);
 		IEEE80211_NODE_STAT_SET(ni, tx_disassoc_code, arg);
@@ -2016,8 +2016,8 @@
 	struct ieee80211_frame *wh;
 	struct mbuf *m;
 	int pktlen;
-	u_int8_t *frm;
-	u_int16_t capinfo;
+	uint8_t *frm;
+	uint16_t capinfo;
 	struct ieee80211_rateset *rs;
 
 	/*
@@ -2043,8 +2043,8 @@
 	 */
 	rs = &ni->ni_rates;
 	pktlen =   8					/* time stamp */
-		 + sizeof(u_int16_t)			/* beacon interval */
-		 + sizeof(u_int16_t)			/* capabilities */
+		 + sizeof(uint16_t)			/* beacon interval */
+		 + sizeof(uint16_t)			/* capabilities */
 		 + 2 + ni->ni_esslen			/* ssid */
 	         + 2 + IEEE80211_RATE_SIZE		/* supported rates */
 	         + 2 + 1				/* DS parameters */
@@ -2071,11 +2071,11 @@
 
 	memset(frm, 0, 8);	/* XXX timestamp is set by hardware/driver */
 	frm += 8;
-	*(u_int16_t *)frm = htole16(ni->ni_intval);
+	*(uint16_t *)frm = htole16(ni->ni_intval);
 	frm += 2;
 	capinfo = getcapinfo(ic, ni->ni_chan);
-	bo->bo_caps = (u_int16_t *)frm;
-	*(u_int16_t *)frm = htole16(capinfo);
+	bo->bo_caps = (uint16_t *)frm;
+	*(uint16_t *)frm = htole16(capinfo);
 	frm += 2;
 	*frm++ = IEEE80211_ELEMID_SSID;
 	if ((ic->ic_flags & IEEE80211_F_HIDESSID) == 0) {
@@ -2137,7 +2137,7 @@
 	} else
 		bo->bo_htinfo = NULL;
 	bo->bo_trailer_len = frm - bo->bo_trailer;
-	m->m_pkthdr.len = m->m_len = frm - mtod(m, u_int8_t *);
+	m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *);
 
 	M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT);
 	KASSERT(m != NULL, ("no space for 802.11 header?"));
@@ -2145,11 +2145,11 @@
 	wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_MGT |
 	    IEEE80211_FC0_SUBTYPE_BEACON;
 	wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
-	*(u_int16_t *)wh->i_dur = 0;
+	*(uint16_t *)wh->i_dur = 0;
 	IEEE80211_ADDR_COPY(wh->i_addr1, ifp->if_broadcastaddr);
 	IEEE80211_ADDR_COPY(wh->i_addr2, ic->ic_myaddr);
 	IEEE80211_ADDR_COPY(wh->i_addr3, ni->ni_bssid);
-	*(u_int16_t *)wh->i_seq = 0;
+	*(uint16_t *)wh->i_seq = 0;
 
 	return m;
 }
@@ -2162,7 +2162,7 @@
 	struct ieee80211_beacon_offsets *bo, struct mbuf *m, int mcast)
 {
 	int len_changed = 0;
-	u_int16_t capinfo;
+	uint16_t capinfo;
 
 	IEEE80211_BEACON_LOCK(ic);
 	/* XXX faster to recalculate entirely or just changes? */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705130503.l4D53U9V051538>