Date: Tue, 26 Apr 2016 01:29:26 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298605 - head/sys/net80211 Message-ID: <201604260129.u3Q1TQWD088284@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Tue Apr 26 01:29:26 2016 New Revision: 298605 URL: https://svnweb.freebsd.org/changeset/base/298605 Log: [net80211] add the STBC ioctl support. This adds configurable STBC TX and RX support. Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Tue Apr 26 01:29:03 2016 (r298604) +++ head/sys/net80211/ieee80211_ioctl.c Tue Apr 26 01:29:26 2016 (r298605) @@ -1128,6 +1128,13 @@ ieee80211_ioctl_get80211(struct ieee8021 ireq->i_val = (vap->iv_flags_ht & IEEE80211_FHT_RIFS) != 0; break; + case IEEE80211_IOC_STBC: + ireq->i_val = 0; + if (vap->iv_flags_ht & IEEE80211_FHT_STBC_TX) + ireq->i_val |= 1; + if (vap->iv_flags_ht & IEEE80211_FHT_STBC_RX) + ireq->i_val |= 2; + break; default: error = ieee80211_ioctl_getdefault(vap, ireq); break; @@ -3265,6 +3272,31 @@ ieee80211_ioctl_set80211(struct ieee8021 if (isvapht(vap)) error = ERESTART; break; + case IEEE80211_IOC_STBC: + /* Check if we can do STBC TX/RX before changing the setting */ + if ((ireq->i_val & 1) && + ((vap->iv_htcaps & IEEE80211_HTCAP_TXSTBC) == 0)) + return EOPNOTSUPP; + if ((ireq->i_val & 2) && + ((vap->iv_htcaps & IEEE80211_HTCAP_RXSTBC) == 0)) + return EOPNOTSUPP; + + /* TX */ + if (ireq->i_val & 1) + vap->iv_flags_ht |= IEEE80211_FHT_STBC_TX; + else + vap->iv_flags_ht &= ~IEEE80211_FHT_STBC_TX; + + /* RX */ + if (ireq->i_val & 2) + vap->iv_flags_ht |= IEEE80211_FHT_STBC_RX; + else + vap->iv_flags_ht &= ~IEEE80211_FHT_STBC_RX; + + /* NB: reset only if we're operating on an 11n channel */ + if (isvapht(vap)) + error = ERESTART; + break; default: error = ieee80211_ioctl_setdefault(vap, ireq); break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604260129.u3Q1TQWD088284>