Author: adrian
Date: Thu Jul  7 17:22:13 2016
New Revision: 302392
URL: https://svnweb.freebsd.org/changeset/base/302392

Log:
  [ath] obey the short-GI vap config flag when transmitting.
  
  This makes 'ifconfig wlanX -shortgi' work correctly.
  
  Tested:
  
  * AR9380, STA mode
  
  Approved by:  re (gjb)

Modified:
  head/sys/dev/ath/if_ath_tx_ht.c

Modified: head/sys/dev/ath/if_ath_tx_ht.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx_ht.c     Thu Jul  7 15:25:14 2016        
(r302391)
+++ head/sys/dev/ath/if_ath_tx_ht.c     Thu Jul  7 17:22:13 2016        
(r302392)
@@ -222,6 +222,7 @@ void
 ath_tx_rate_fill_rcflags(struct ath_softc *sc, struct ath_buf *bf)
 {
        struct ieee80211_node *ni = bf->bf_node;
+       struct ieee80211vap *vap = ni->ni_vap;
        struct ieee80211com *ic = ni->ni_ic;
        const HAL_RATE_TABLE *rt = sc->sc_currates;
        struct ath_rc_series *rc = bf->bf_state.bfs_rc;
@@ -280,12 +281,14 @@ ath_tx_rate_fill_rcflags(struct ath_soft
 
                        if (ni->ni_chw == 40 &&
                            ic->ic_htcaps & IEEE80211_HTCAP_SHORTGI40 &&
-                           ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40)
+                           ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40 &&
+                           vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40)
                                rc[i].flags |= ATH_RC_SGI_FLAG;
 
                        if (ni->ni_chw == 20 &&
                            ic->ic_htcaps & IEEE80211_HTCAP_SHORTGI20 &&
-                           ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20)
+                           ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20 &&
+                           vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20)
                                rc[i].flags |= ATH_RC_SGI_FLAG;
 
                        /*
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to