[802.11] Add core support for detecting and using encrypted networks