* Calculate HT channel promotion flags for all vaps. * This assumes ni_chan have been setup for each vap. */
| 692 | * This assumes ni_chan have been setup for each vap. |
| 693 | */ |
| 694 | static int |
| 695 | gethtadjustflags(struct ieee80211com *ic) |
| 696 | { |
| 697 | struct ieee80211vap *vap; |
| 698 | int flags; |
| 699 | |
| 700 | flags = 0; |
| 701 | /* XXX locking */ |
| 702 | TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { |
| 703 | if (vap->iv_state < IEEE80211_S_RUN) |
| 704 | continue; |
| 705 | switch (vap->iv_opmode) { |
| 706 | case IEEE80211_M_WDS: |
| 707 | case IEEE80211_M_STA: |
| 708 | case IEEE80211_M_AHDEMO: |
| 709 | case IEEE80211_M_HOSTAP: |
| 710 | case IEEE80211_M_IBSS: |
| 711 | case IEEE80211_M_MBSS: |
| 712 | flags |= ieee80211_htchanflags(vap->iv_bss->ni_chan); |
| 713 | break; |
| 714 | default: |
| 715 | break; |
| 716 | } |
| 717 | } |
| 718 | return flags; |
| 719 | } |
| 720 | |
| 721 | /* |
| 722 | * Calculate VHT channel promotion flags for all vaps. |
no test coverage detected