diff options
Diffstat (limited to 'sys/net80211')
29 files changed, 28 insertions, 63 deletions
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 62c40e263aba..5fa59186c5ea 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -101,7 +101,6 @@ struct ieee80211_frame_addr4 { uint8_t i_addr4[IEEE80211_ADDR_LEN]; } __packed; - struct ieee80211_qosframe_addr4 { uint8_t i_fc[2]; uint8_t i_dur[2]; @@ -742,7 +741,6 @@ struct ieee80211_ie_htinfo { #define IEEE80211_HTINFO_BASIC_STBCMCS_S 0 #define IEEE80211_HTINFO_DUALPROTECTED 0x80 - /* * 802.11ac definitions - 802.11ac-2013 . */ diff --git a/sys/net80211/ieee80211_action.c b/sys/net80211/ieee80211_action.c index 49f954a7b6f3..0e917fb17a8e 100644 --- a/sys/net80211/ieee80211_action.c +++ b/sys/net80211/ieee80211_action.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/systm.h> - + #include <sys/socket.h> #include <net/if.h> diff --git a/sys/net80211/ieee80211_ageq.c b/sys/net80211/ieee80211_ageq.c index ad070b34b847..8055012899f3 100644 --- a/sys/net80211/ieee80211_ageq.c +++ b/sys/net80211/ieee80211_ageq.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/kernel.h> #include <sys/malloc.h> - + #include <sys/socket.h> #include <net/if.h> diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index d565b3511170..59760d1e7d9c 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -747,7 +747,6 @@ ieee80211_crypto_demic(struct ieee80211vap *vap, struct ieee80211_key *k, return (cip->ic_miclen > 0 ? cip->ic_demic(k, m, force) : 1); } - static void load_ucastkey(void *arg, struct ieee80211_node *ni) { diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index cff53b6ef994..59230d3538a7 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -209,7 +209,6 @@ tkip_encap(struct ieee80211_key *k, struct mbuf *m) if ((! is_mgmt) && (k->wk_flags & IEEE80211_KEY_NOIV)) return 1; - hdrlen = ieee80211_hdrspace(ic, mtod(m, void *)); /* @@ -790,25 +789,21 @@ wep_decrypt(u8 *key, struct mbuf *m, u_int off, size_t data_len) return 0; } - static __inline u32 rotl(u32 val, int bits) { return (val << bits) | (val >> (32 - bits)); } - static __inline u32 rotr(u32 val, int bits) { return (val >> bits) | (val << (32 - bits)); } - static __inline u32 xswap(u32 val) { return ((val & 0x00ff00ff) << 8) | ((val & 0xff00ff00) >> 8); } - #define michael_block(l, r) \ do { \ r ^= rotl(l, 17); \ @@ -821,7 +816,6 @@ do { \ l += r; \ } while (0) - static __inline u32 get_le32_split(u8 b0, u8 b1, u8 b2, u8 b3) { return b0 | (b1 << 8) | (b2 << 16) | (b3 << 24); @@ -832,7 +826,6 @@ static __inline u32 get_le32(const u8 *p) return get_le32_split(p[0], p[1], p[2], p[3]); } - static __inline void put_le32(u8 *p, u32 v) { p[0] = v; diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index c9afb8b5177a..2a45d7a604d8 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -629,7 +629,6 @@ ieee80211_get_rx_params_ptr(struct mbuf *m) return (&rx->params); } - /* * Add TOA parameters to the given mbuf. */ @@ -1148,4 +1147,3 @@ MODULE_DEPEND(wlan, ether, 1, 1, 1); #ifdef IEEE80211_ALQ MODULE_DEPEND(wlan, alq, 1, 1, 1); #endif /* IEEE80211_ALQ */ - diff --git a/sys/net80211/ieee80211_freebsd.h b/sys/net80211/ieee80211_freebsd.h index 5913f1e69fe4..71abe9099903 100644 --- a/sys/net80211/ieee80211_freebsd.h +++ b/sys/net80211/ieee80211_freebsd.h @@ -154,7 +154,7 @@ typedef struct mtx ieee80211_psq_lock_t; IF_UNLOCK(ifq); \ } while (0) #endif /* IF_PREPEND_LIST */ - + /* * Age queue definitions. */ diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 6687276d0181..8402ade857ff 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -1637,7 +1637,7 @@ ieee80211_deliver_l2uf(struct ieee80211_node *ni) struct mbuf *m; struct l2_update_frame *l2uf; struct ether_header *eh; - + m = m_gethdr(M_NOWAIT, MT_DATA); if (m == NULL) { IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni, @@ -1652,14 +1652,14 @@ ieee80211_deliver_l2uf(struct ieee80211_node *ni) /* src: associated STA */ IEEE80211_ADDR_COPY(eh->ether_shost, ni->ni_macaddr); eh->ether_type = htons(sizeof(*l2uf) - sizeof(*eh)); - + l2uf->dsap = 0; l2uf->ssap = 0; l2uf->control = 0xf5; l2uf->xid[0] = 0x81; l2uf->xid[1] = 0x80; l2uf->xid[2] = 0x00; - + m->m_pkthdr.len = m->m_len = sizeof(*l2uf); hostap_deliver_data(vap, ni, m); } diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 6f29d81b91b9..44514a16da52 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/systm.h> #include <sys/endian.h> - + #include <sys/socket.h> #include <net/if.h> @@ -2915,7 +2915,6 @@ ieee80211_send_bar(struct ieee80211_node *ni, uint8_t *frm; int tid, ret; - IEEE80211_NOTE(tap->txa_ni->ni_vap, IEEE80211_MSG_11N, tap->txa_ni, "%s: called", diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index 9f1a9fef6818..75c3eeb7c759 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -120,7 +120,6 @@ static void hwmp_peerdown(struct ieee80211_node *); static struct timeval ieee80211_hwmp_preqminint = { 0, 100000 }; static struct timeval ieee80211_hwmp_perrminint = { 0, 100000 }; - /* NB: the Target Address set in a Proactive PREQ is the broadcast address. */ static const uint8_t broadcastaddr[IEEE80211_ADDR_LEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; @@ -217,7 +216,6 @@ SYSCTL_PROC(_net_wlan_hwmp, OID_AUTO, inact, &mesh_proto_hwmp.mpp_inact, 0, ieee80211_sysctl_msecs_ticks, "I", "mesh route inactivity timeout (ms)"); - static void ieee80211_hwmp_init(void) { @@ -1878,7 +1876,6 @@ hwmp_rediscover_cb(void *arg) hr->hr_preqretries++; - IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_HWMP, rt->rt_dest, "start path rediscovery , target seq %u", hr->hr_seq); /* diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 404eaf96716a..aa557fc1ec24 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -37,9 +37,9 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/endian.h> #include <sys/kernel.h> - + #include <sys/socket.h> - + #include <net/ethernet.h> #include <net/if.h> #include <net/if_var.h> diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index ceb621731f5a..91bca6b819a6 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include <sys/socket.h> #include <sys/sockio.h> #include <sys/systm.h> - + #include <net/if.h> #include <net/if_var.h> #include <net/if_dl.h> diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h index 573661d5323d..21c20c7a58d9 100644 --- a/sys/net80211/ieee80211_ioctl.h +++ b/sys/net80211/ieee80211_ioctl.h @@ -371,7 +371,6 @@ enum { IEEE80211_HWMP_ROOTMODE_RANN = 3, /* use RANN elemid */ }; - /* * Set the active channel list by IEEE channel #: each channel * to be marked active is set in a bit vector. Note this list is diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index d56bc4230c92..fdb84a2acb3d 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -895,7 +895,6 @@ ieee80211_mesh_mark_gate(struct ieee80211vap *vap, const uint8_t *addr, return gr; } - /* * Helper function to note the Mesh Peer Link FSM change. */ @@ -951,7 +950,7 @@ static void mesh_checkid(void *arg, struct ieee80211_node *ni) { uint16_t *r = arg; - + if (*r == ni->ni_mllid) *(uint16_t *)arg = 0; } @@ -2186,7 +2185,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni, return NULL; } } - + /* * Close frames are accepted if meshid is the same. * Verify the other two types. @@ -2231,7 +2230,7 @@ mesh_parse_meshpeering_action(struct ieee80211_node *ni, } return NULL; } - + return (const struct ieee80211_meshpeer_ie *) mp; } @@ -2510,7 +2509,7 @@ mesh_recv_action_meshlmetric(struct ieee80211_node *ni, (const struct ieee80211_meshlmetric_ie *) (frm+2); /* action + code */ struct ieee80211_meshlmetric_ie lm_rep; - + if (ie->lm_flags & IEEE80211_MESH_LMETRIC_FLAGS_REQ) { lm_rep.lm_flags = 0; lm_rep.lm_metric = mesh_airtime_calc(ni); @@ -2606,7 +2605,6 @@ mesh_recv_action_meshgate(struct ieee80211_node *ni, /* corresponding mesh gate found & GANN accepted */ found = 1; break; - } if (found == 0) { /* this GANN is from a new mesh Gate add it to known table. */ @@ -3005,7 +3003,7 @@ static void mesh_peer_timeout_backoff(struct ieee80211_node *ni) { uint32_t r; - + r = arc4random(); ni->ni_mltval += r % ni->ni_mltval; callout_reset(&ni->ni_mltimer, ni->ni_mltval, mesh_peer_timeout_cb, @@ -3039,7 +3037,7 @@ mesh_peer_timeout_cb(void *arg) IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_MESH, ni, "mesh link timeout, state %d, retry counter %d", ni->ni_mlstate, ni->ni_mlrcnt); - + switch (ni->ni_mlstate) { case IEEE80211_NODE_MESH_IDLE: case IEEE80211_NODE_MESH_ESTABLISHED: diff --git a/sys/net80211/ieee80211_mesh.h b/sys/net80211/ieee80211_mesh.h index 89423bd8f817..9fff6c3c548c 100644 --- a/sys/net80211/ieee80211_mesh.h +++ b/sys/net80211/ieee80211_mesh.h @@ -90,7 +90,6 @@ enum { /* Authentication Protocol Identifier */ enum { - IEEE80211_MESHCONF_AUTH_DISABLED = 0, /* Simultaneous Authenticaction of Equals */ IEEE80211_MESHCONF_AUTH_SEA = 1, diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 9ee5b1b83cde..64a0164aeb81 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -574,7 +574,6 @@ check_bss_debug(struct ieee80211vap *vap, struct ieee80211_node *ni) } #endif /* IEEE80211_DEBUG */ - int ieee80211_ibss_merge_check(struct ieee80211_node *ni) { @@ -640,7 +639,6 @@ ieee80211_ibss_node_check_new(struct ieee80211_node *ni, * Check if the scan SSID matches the SSID list for the VAP. */ for (i = 0; i < vap->iv_des_nssid; i++) { - /* Sanity length check */ if (vap->iv_des_ssid[i].len != scan->ssid[1]) continue; @@ -1815,7 +1813,6 @@ ieee80211_init_neighbor(struct ieee80211_node *ni, (ni->ni_vap->iv_flags_vht & IEEE80211_FVHT_VHT)) { do_vht_setup = 1; } - } /* NB: must be after ni_chan is setup */ diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index a753c8c8faed..44c2fc2a128e 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include <sys/endian.h> #include <sys/socket.h> - + #include <net/bpf.h> #include <net/ethernet.h> #include <net/if.h> @@ -174,7 +174,6 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, BPF_MTAP(ifp, m); /* 802.3 tx */ - /* * Figure out if we can do A-MPDU, A-MSDU or FF. * @@ -327,8 +326,6 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, return (0); } - - /* * Send the given mbuf through the given vap. * @@ -1479,7 +1476,7 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni, int meshhdrsize, meshae; uint8_t *qos; int is_amsdu = 0; - + IEEE80211_TX_LOCK_ASSERT(ic); is_mcast = !! (m->m_flags & (M_MCAST | M_BCAST)); @@ -2645,7 +2642,6 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int type, int arg) memset(¶ms, 0, sizeof(params)); switch (type) { - case IEEE80211_FC0_SUBTYPE_AUTH: status = arg >> 16; arg &= 0xffff; diff --git a/sys/net80211/ieee80211_phy.c b/sys/net80211/ieee80211_phy.c index 16bfbf62b7a1..8bf643b17307 100644 --- a/sys/net80211/ieee80211_phy.c +++ b/sys/net80211/ieee80211_phy.c @@ -582,7 +582,6 @@ static const uint16_t ht40_bps[32] = { 216, 432, 648, 864, 1296, 1728, 1944, 2160 }; - #define OFDM_PLCP_BITS 22 #define HT_L_STF 8 #define HT_L_LTF 8 diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_power.c index 75d2dbea92ce..8538d6e5323c 100644 --- a/sys/net80211/ieee80211_power.c +++ b/sys/net80211/ieee80211_power.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/kernel.h> #include <sys/malloc.h> - + #include <sys/socket.h> #include <net/if.h> diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 2f98deea88d9..ad27275d8cfb 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -104,7 +104,6 @@ const char *ieee80211_wme_acnames[] = { "WME_UPSD", }; - /* * Reason code descriptions were (mostly) obtained from * IEEE Std 802.11-2012, pp. 442-445 Table 8-36. @@ -1693,7 +1692,7 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap) /* XXX WDS? */ /* XXX MBSS? */ - + if (do_aggrmode) { chanp = &wme->wme_chanParams.cap_wmeParams[WME_AC_BE]; bssp = &wme->wme_bssChanParams.cap_wmeParams[WME_AC_BE]; @@ -1713,7 +1712,6 @@ ieee80211_wme_updateparams_locked(struct ieee80211vap *vap) chanp->wmep_logcwmax, chanp->wmep_txopLimit); } - /* * Change the contention window based on the number of associated * stations. If the number of associated stations is 1 and @@ -1996,7 +1994,6 @@ ieee80211_start_locked(struct ieee80211vap *vap) * to be brought up auto-up the parent if necessary. */ if (ic->ic_nrunning++ == 0) { - /* reset the channel to a known good channel */ if (ieee80211_start_check_reset_chan(vap)) ieee80211_start_reset_chan(vap); diff --git a/sys/net80211/ieee80211_radiotap.c b/sys/net80211/ieee80211_radiotap.c index 80c720a6c57b..08117a9e8c05 100644 --- a/sys/net80211/ieee80211_radiotap.c +++ b/sys/net80211/ieee80211_radiotap.c @@ -39,9 +39,9 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/endian.h> #include <sys/kernel.h> - + #include <sys/socket.h> - + #include <net/bpf.h> #include <net/if.h> #include <net/if_var.h> diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index d4369e8e0cd1..f6e76e9fe8aa 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -286,7 +286,6 @@ enum ieee80211_radiotap_type { #define IEEE80211_RADIOTAP_F_TX_CTS 0x0002 /* used cts 'protection' */ #define IEEE80211_RADIOTAP_F_TX_RTS 0x0004 /* used rts/cts handshake */ - /* For IEEE80211_RADIOTAP_MCS */ #define IEEE80211_RADIOTAP_MCS_HAVE_BW 0x01 #define IEEE80211_RADIOTAP_MCS_HAVE_MCS 0x02 diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index ee05d89efb5e..1e07aacfc201 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/condvar.h> - + #include <sys/socket.h> #include <net/if.h> diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c index ea75504a7235..7ac959241358 100644 --- a/sys/net80211/ieee80211_scan_sta.c +++ b/sys/net80211/ieee80211_scan_sta.c @@ -1556,7 +1556,7 @@ static int adhoc_start(struct ieee80211_scan_state *ss, struct ieee80211vap *vap) { struct sta_table *st = ss->ss_priv; - + makescanlist(ss, vap, adhocScanTable); if (ss->ss_mindwell == 0) diff --git a/sys/net80211/ieee80211_scan_sw.c b/sys/net80211/ieee80211_scan_sw.c index 4fcd26db61b1..4c184095ad35 100644 --- a/sys/net80211/ieee80211_scan_sw.c +++ b/sys/net80211/ieee80211_scan_sw.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/condvar.h> - + #include <sys/socket.h> #include <net/if.h> @@ -232,7 +232,6 @@ ieee80211_swscan_start_scan_locked(const struct ieee80211_scanner *scan, return 0; } - /* * Start a scan unless one is already going. * diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index f852c4b88b58..9c17358e93a9 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1580,7 +1580,6 @@ sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype, * us then get us out of STA mode powersave. */ if (tim_ucast == 1) { - /* * Wake us out of SLEEP state if we're * in it; and if we're doing bgscan diff --git a/sys/net80211/ieee80211_superg.c b/sys/net80211/ieee80211_superg.c index dacd466c3de7..30c01e0761dc 100644 --- a/sys/net80211/ieee80211_superg.c +++ b/sys/net80211/ieee80211_superg.c @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); #include <sys/endian.h> #include <sys/socket.h> - + #include <net/if.h> #include <net/if_var.h> #include <net/if_llc.h> @@ -590,7 +590,6 @@ bad: return NULL; } - static void ff_transmit(struct ieee80211_node *ni, struct mbuf *m) { diff --git a/sys/net80211/ieee80211_tdma.h b/sys/net80211/ieee80211_tdma.h index 9b108e4ba724..f0cbf5cdd77f 100644 --- a/sys/net80211/ieee80211_tdma.h +++ b/sys/net80211/ieee80211_tdma.h @@ -87,7 +87,7 @@ struct ieee80211_tdma_state { const struct ieee80211_rx_stats *rxs, int, int); void (*tdma_opdetach)(struct ieee80211vap *); }; - + #define TDMA_UPDATE_SLOT 0x0001 /* tdma_slot changed */ #define TDMA_UPDATE_SLOTCNT 0x0002 /* tdma_slotcnt changed */ #define TDMA_UPDATE_SLOTLEN 0x0004 /* tdma_slotlen changed */ diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index dbf9f9f69b4b..9582b89a446c 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include <sys/malloc.h> #include <sys/systm.h> #include <sys/endian.h> - + #include <sys/socket.h> #include <net/if.h> |