From: stsp Date: Mon, 15 Aug 2016 22:14:19 +0000 (+0000) Subject: Expose more 802.11n information to userspace: X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ec43501f0e830f804f4d0a237894c3d546b85ceb;p=openbsd Expose more 802.11n information to userspace: A flag which indicates whether HT has been negotiated with a node, and the current Tx MCS value we use for a node. This grows struct ieee80211_nodereq. Applications using it must be recompiled. ok mpi@ --- diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 49cd7e04e36..f10a4ab170a 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.c,v 1.41 2016/04/28 13:50:14 stsp Exp $ */ +/* $OpenBSD: ieee80211_ioctl.c,v 1.42 2016/08/15 22:14:19 stsp Exp $ */ /* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */ /*- @@ -112,6 +112,9 @@ ieee80211_node2req(struct ieee80211com *ic, const struct ieee80211_node *ni, memcpy(nr->nr_rxmcs, ni->ni_rxmcs, sizeof(nr->nr_rxmcs)); nr->nr_max_rxrate = ni->ni_max_rxrate; nr->nr_tx_mcs_set = ni->ni_tx_mcs_set; + nr->nr_txmcs = ni->ni_txmcs; + if (ni->ni_flags & IEEE80211_NODE_HT) + nr->nr_flags |= IEEE80211_NODEREQ_HT; } void diff --git a/sys/net80211/ieee80211_ioctl.h b/sys/net80211/ieee80211_ioctl.h index d652a0365f2..3ab99117681 100644 --- a/sys/net80211/ieee80211_ioctl.h +++ b/sys/net80211/ieee80211_ioctl.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.h,v 1.26 2016/04/28 14:46:10 stsp Exp $ */ +/* $OpenBSD: ieee80211_ioctl.h,v 1.27 2016/08/15 22:14:19 stsp Exp $ */ /* $NetBSD: ieee80211_ioctl.h,v 1.7 2004/04/30 22:51:04 dyoung Exp $ */ /*- @@ -339,6 +339,7 @@ struct ieee80211_nodereq { uint8_t nr_rxmcs[howmany(80,NBBY)]; uint16_t nr_max_rxrate; /* in Mb/s, 0 <= rate <= 1023 */ uint8_t nr_tx_mcs_set; + uint8_t nr_txmcs; }; #define IEEE80211_NODEREQ_STATE(_s) (1 << _s) @@ -352,6 +353,7 @@ struct ieee80211_nodereq { #define IEEE80211_NODEREQ_AP 0x01 /* access point */ #define IEEE80211_NODEREQ_AP_BSS 0x02 /* current bss access point */ #define IEEE80211_NODEREQ_COPY 0x04 /* add node with flags */ +#define IEEE80211_NODEREQ_HT 0x08 /* HT negotiated */ #define SIOCG80211NODE _IOWR('i', 211, struct ieee80211_nodereq) #define SIOCS80211NODE _IOW('i', 212, struct ieee80211_nodereq)