MCPcopy Create free account
hub / github.com/F-Stack/f-stack / wpa_keymgmt

Function wpa_keymgmt

freebsd/net80211/ieee80211_hostap.c:1209–1225  ·  view source on GitHub ↗

* Convert a WPA key management/authentication algorithm * to an internal code. */

Source from the content-addressed store, hash-verified

1207 * to an internal code.
1208 */
1209static int
1210wpa_keymgmt(const uint8_t *sel)
1211{
1212#define WPA_SEL(x) (((x)<<24)|WPA_OUI)
1213 uint32_t w = le32dec(sel);
1214
1215 switch (w) {
1216 case WPA_SEL(WPA_ASE_8021X_UNSPEC):
1217 return WPA_ASE_8021X_UNSPEC;
1218 case WPA_SEL(WPA_ASE_8021X_PSK):
1219 return WPA_ASE_8021X_PSK;
1220 case WPA_SEL(WPA_ASE_NONE):
1221 return WPA_ASE_NONE;
1222 }
1223 return 0; /* NB: so is discarded */
1224#undef WPA_SEL
1225}
1226
1227/*
1228 * Parse a WPA information element to collect parameters.

Callers 1

ieee80211_parse_wpaFunction · 0.70

Calls 1

le32decFunction · 0.85

Tested by

no test coverage detected