[MAC80211]: split out some key functions from ieee80211.c