This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3301: Security bitmap

Part Number: CC3301


Tool/software:

Hello, 

i have a question regarding wifi security bitmaping. 

In wlan_if.h their is following defines : 

#define WLAN_SEC_TYPE_OPEN                                                        (0)
#define WLAN_SEC_TYPE_WEP                                                         (1)
#define WLAN_SEC_TYPE_WPA                                                         (2) /* deprecated */
#define WLAN_SEC_TYPE_WPA_WPA2                                                    (2)
#define WLAN_SEC_TYPE_WPS_PBC                                                     (3)
#define WLAN_SEC_TYPE_WPS_PIN                                                     (4)
#define WLAN_SEC_TYPE_WPA_ENT                                                     (5)
.....

When looking in command parse i see that security types are not mapped the same way  : 

#define SECURITY_TYPE_BITMAP_OPEN            (0)
#define SECURITY_TYPE_BITMAP_WEP             (1 << 0)
#define SECURITY_TYPE_BITMAP_WPA             (1 << 1)
#define SECURITY_TYPE_BITMAP_WPA2            (1 << 2)
#define SECURITY_TYPE_BITMAP_WPA3            (1 << 3)
#define SECURITY_TYPE_BITMAP_PMF_CAPABLE     (1 << 4)
#define SECURITY_TYPE_BITMAP_PMF_REQUIRED    (1 << 5)


Can you please bring me some enlightenment on what is the correct way of reading bit fields ?

The first above bitmap seem to work for reading scan results output, but is their a reason these are not defined in wlan_if.h ?

thank you,

Best