* Calculate VHT channel promotion flags for all vaps. * This assumes ni_chan have been setup for each vap. */
| 723 | * This assumes ni_chan have been setup for each vap. |
| 724 | */ |
| 725 | static int |
| 726 | getvhtadjustflags(struct ieee80211com *ic) |
| 727 | { |
| 728 | struct ieee80211vap *vap; |
| 729 | int flags; |
| 730 | |
| 731 | flags = 0; |
| 732 | /* XXX locking */ |
| 733 | TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { |
| 734 | if (vap->iv_state < IEEE80211_S_RUN) |
| 735 | continue; |
| 736 | switch (vap->iv_opmode) { |
| 737 | case IEEE80211_M_WDS: |
| 738 | case IEEE80211_M_STA: |
| 739 | case IEEE80211_M_AHDEMO: |
| 740 | case IEEE80211_M_HOSTAP: |
| 741 | case IEEE80211_M_IBSS: |
| 742 | case IEEE80211_M_MBSS: |
| 743 | flags |= ieee80211_vhtchanflags(vap->iv_bss->ni_chan); |
| 744 | break; |
| 745 | default: |
| 746 | break; |
| 747 | } |
| 748 | } |
| 749 | return flags; |
| 750 | } |
| 751 | |
| 752 | /* |
| 753 | * Check if the current channel needs to change based on whether |
no test coverage detected