mac80211: refactor __ieee80211_get_channel_mode