goto out;
 
        /* enable/disable the MAC's WEP packet filter */
-       if (assoc_req->secinfo.WEPstatus == wlan802_11WEPenabled)
+       if (assoc_req->secinfo.wep_enabled)
                adapter->currentpacketfilter |= cmd_act_mac_wep_enable;
        else
                adapter->currentpacketfilter &= ~cmd_act_mac_wep_enable;
 
        wlan802_11infrastructuremax
 };
 
-/** WLAN_802_11_WEP_STATUS */
-enum WLAN_802_11_WEP_STATUS {
-       wlan802_11WEPenabled,
-       wlan802_11WEPdisabled,
-};
-
 /** SNMP_MIB_INDEX_e */
 enum SNMP_MIB_INDEX_e {
        desired_bsstype_i = 0,
 
 struct wlan_802_11_security {
        u8 WPAenabled;
        u8 WPA2enabled;
-       enum WLAN_802_11_WEP_STATUS WEPstatus;
+       u8 wep_enabled;
        u8 auth_mode;
 };
 
 
        adapter->scanmode = cmd_bss_type_any;
 
        /* 802.11 specific */
-       adapter->secinfo.WEPstatus = wlan802_11WEPdisabled;
+       adapter->secinfo.wep_enabled = 0;
        for (i = 0; i < sizeof(adapter->wep_keys) / sizeof(adapter->wep_keys[0]);
             i++)
                memset(&adapter->wep_keys[i], 0, sizeof(struct WLAN_802_11_KEY));
        adapter->wep_tx_keyidx = 0;
-       adapter->secinfo.WEPstatus = wlan802_11WEPdisabled;
        adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
        adapter->inframode = wlan802_11infrastructure;
 
 
 #include "join.h"
 #include "dev.h"
 
+#define AD_HOC_CAP_PRIVACY_ON 1
+
 /**
  *  @brief This function finds out the common rates between rate1 and rate2.
  *
        adhs->probedelay = cpu_to_le16(cmd_scan_probe_delay_time);
 
        /* set up privacy in adapter->scantable[i] */
-       if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) {
-
-#define AD_HOC_CAP_PRIVACY_ON 1
-               lbs_pr_debug(1, "ADHOC_S_CMD: WEPstatus set, privacy to WEP\n");
+       if (adapter->secinfo.wep_enabled) {
+               lbs_pr_debug(1, "ADHOC_S_CMD: WEP enabled, setting privacy on\n");
                pbssdesc->privacy = wlan802_11privfilter8021xWEP;
                adhs->cap.privacy = AD_HOC_CAP_PRIVACY_ON;
        } else {
-               lbs_pr_debug(1, "ADHOC_S_CMD: WEPstatus NOT set, Setting "
-                      "privacy to ACCEPT ALL\n");
+               lbs_pr_debug(1, "ADHOC_S_CMD: WEP disabled, setting privacy off\n");
                pbssdesc->privacy = wlan802_11privfilteracceptall;
        }
 
        padhocjoin->bssdescriptor.ssparamset.ibssparamset.atimwindow =
            cpu_to_le16(pbssdesc->atimwindow);
 
-       if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) {
+       if (adapter->secinfo.wep_enabled) {
                padhocjoin->bssdescriptor.cap.privacy = AD_HOC_CAP_PRIVACY_ON;
        }
 
 
        ENTER();
 
        if (adapter->scantable[index].inframode == mode) {
-               if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled
+               if (   !adapter->secinfo.wep_enabled
                    && !adapter->secinfo.WPAenabled
                    && !adapter->secinfo.WPA2enabled
                    && adapter->scantable[index].wpa_ie[0] != WPA_IE
                        /* no security */
                        LEAVE();
                        return index;
-               } else if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled
+               } else if (   adapter->secinfo.wep_enabled
                           && !adapter->secinfo.WPAenabled
                           && !adapter->secinfo.WPA2enabled
                           && adapter->scantable[index].privacy) {
                        /* static WEP enabled */
                        LEAVE();
                        return index;
-               } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled
+               } else if (   !adapter->secinfo.wep_enabled
                           && adapter->secinfo.WPAenabled
                           && !adapter->secinfo.WPA2enabled
                           && (adapter->scantable[index].wpa_ie[0] == WPA_IE)
                               "privacy=%#x\n", index,
                               adapter->scantable[index].wpa_ie[0],
                               adapter->scantable[index].rsn_ie[0],
-                              (adapter->secinfo.WEPstatus ==
-                               wlan802_11WEPenabled) ? "e" : "d",
-                              (adapter->secinfo.WPAenabled) ? "e" : "d",
-                              (adapter->secinfo.WPA2enabled) ? "e" : "d",
+                              adapter->secinfo.wep_enabled ? "e" : "d",
+                              adapter->secinfo.WPAenabled ? "e" : "d",
+                              adapter->secinfo.WPA2enabled ? "e" : "d",
                               adapter->scantable[index].privacy);
                        LEAVE();
                        return index;
-               } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled
+               } else if (   !adapter->secinfo.wep_enabled
                           && !adapter->secinfo.WPAenabled
                           && adapter->secinfo.WPA2enabled
                           && (adapter->scantable[index].rsn_ie[0] == WPA2_IE)
                               "privacy=%#x\n", index,
                               adapter->scantable[index].wpa_ie[0],
                               adapter->scantable[index].rsn_ie[0],
-                              (adapter->secinfo.WEPstatus ==
-                               wlan802_11WEPenabled) ? "e" : "d",
-                              (adapter->secinfo.WPAenabled) ? "e" : "d",
-                              (adapter->secinfo.WPA2enabled) ? "e" : "d",
+                              adapter->secinfo.wep_enabled ? "e" : "d",
+                              adapter->secinfo.WPAenabled ? "e" : "d",
+                              adapter->secinfo.WPA2enabled ? "e" : "d",
                               adapter->scantable[index].privacy);
                        LEAVE();
                        return index;
-               } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled
+               } else if (   !adapter->secinfo.wep_enabled
                           && !adapter->secinfo.WPAenabled
                           && !adapter->secinfo.WPA2enabled
                           && (adapter->scantable[index].wpa_ie[0] != WPA_IE)
                       index,
                       adapter->scantable[index].wpa_ie[0],
                       adapter->scantable[index].rsn_ie[0],
-                      (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) ? "e" : "d",
-                      (adapter->secinfo.WPAenabled) ? "e" : "d",
-                      (adapter->secinfo.WPA2enabled) ? "e" : "d",
+                      adapter->secinfo.wep_enabled ? "e" : "d",
+                      adapter->secinfo.WPAenabled ? "e" : "d",
+                      adapter->secinfo.WPA2enabled ? "e" : "d",
                       adapter->scantable[index].privacy);
                LEAVE();
                return -ECONNREFUSED;
 
                                /*  If station is WEP enabled, send the
                                 *  command to set WEP in firmware
                                 */
-                               if (adapter->secinfo.WEPstatus ==
-                                   wlan802_11WEPenabled) {
+                               if (adapter->secinfo.wep_enabled) {
                                        lbs_pr_debug(1, "set_freq: WEP enabled\n");
                                        ret = libertas_prepare_and_send_command(priv,
                                                                    cmd_802_11_set_wep,
                break;
        }
 
-       if ((adapter->secinfo.WEPstatus == wlan802_11WEPenabled)
-           || adapter->secinfo.WPAenabled || adapter->secinfo.WPA2enabled) {
+       if (   adapter->secinfo.wep_enabled
+           || adapter->secinfo.WPAenabled
+           || adapter->secinfo.WPA2enabled) {
                dwrq->flags &= ~IW_ENCODE_DISABLED;
        } else {
                dwrq->flags |= IW_ENCODE_DISABLED;
        if (index < 0)
                index = adapter->wep_tx_keyidx;
 
-       if ((adapter->wep_keys[index].len) &&
-           (adapter->secinfo.WEPstatus == wlan802_11WEPenabled)) {
+       if ((adapter->wep_keys[index].len) && adapter->secinfo.wep_enabled) {
                memcpy(extra, adapter->wep_keys[index].key,
                       adapter->wep_keys[index].len);
                dwrq->length = adapter->wep_keys[index].len;
                assoc_req->wep_tx_keyidx = index;
        }
 
-       assoc_req->secinfo.WEPstatus = wlan802_11WEPenabled;
+       assoc_req->secinfo.wep_enabled = 1;
 
        LEAVE();
        return 0;
        assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
 
        /* Clear WEP keys and mark WEP as disabled */
-       assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
+       assoc_req->secinfo.wep_enabled = 0;
        for (i = 0; i < 4; i++)
                assoc_req->wep_keys[i].len = 0;
 
        /* If WEP isn't enabled, or if there is no key data but a valid
         * index, set the TX key.
         */
-       if ((assoc_req->secinfo.WEPstatus != wlan802_11WEPenabled)
-           || (dwrq->length == 0 && !is_default))
+       if (!assoc_req->secinfo.wep_enabled || (dwrq->length == 0 && !is_default))
                set_tx_key = 1;
 
        ret = wlan_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key);
        dwrq->flags = index + 1;
        memset(ext, 0, sizeof(*ext));
 
-       if ((adapter->secinfo.WEPstatus == wlan802_11WEPdisabled)
-           && !adapter->secinfo.WPAenabled && !adapter->secinfo.WPA2enabled) {
+       if (   !adapter->secinfo.wep_enabled
+           && !adapter->secinfo.WPAenabled
+           && !adapter->secinfo.WPA2enabled) {
                ext->alg = IW_ENCODE_ALG_NONE;
                ext->key_len = 0;
                dwrq->flags |= IW_ENCODE_DISABLED;
        } else {
                u8 *key = NULL;
 
-               if ((adapter->secinfo.WEPstatus == wlan802_11WEPenabled)
+               if (   adapter->secinfo.wep_enabled
                    && !adapter->secinfo.WPAenabled
                    && !adapter->secinfo.WPA2enabled) {
                        ext->alg = IW_ENCODE_ALG_WEP;
                        ext->key_len = adapter->wep_keys[index].len;
                        key = &adapter->wep_keys[index].key[0];
-               } else if ((adapter->secinfo.WEPstatus == wlan802_11WEPdisabled) &&
-                          (adapter->secinfo.WPAenabled ||
-                           adapter->secinfo.WPA2enabled)) {
+               } else if (   !adapter->secinfo.wep_enabled
+                          && (adapter->secinfo.WPAenabled ||
+                              adapter->secinfo.WPA2enabled)) {
                        /* WPA */
                        ext->alg = IW_ENCODE_ALG_TKIP;
                        ext->key_len = 0;
                /* If WEP isn't enabled, or if there is no key data but a valid
                 * index, or if the set-TX-key flag was passed, set the TX key.
                 */
-               if ((assoc_req->secinfo.WEPstatus != wlan802_11WEPenabled)
+               if (   !assoc_req->secinfo.wep_enabled
                    || (dwrq->length == 0 && !is_default)
                    || (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY))
                        set_tx_key = 1;
                }
                if (dwrq->value & IW_AUTH_WPA_VERSION_WPA) {
                        assoc_req->secinfo.WPAenabled = 1;
-                       assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
+                       assoc_req->secinfo.wep_enabled = 0;
                        assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
                }
                if (dwrq->value & IW_AUTH_WPA_VERSION_WPA2) {
                        assoc_req->secinfo.WPA2enabled = 1;
-                       assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
+                       assoc_req->secinfo.wep_enabled = 0;
                        assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
                }
                updated = 1;
                            !assoc_req->secinfo.WPA2enabled) {
                                assoc_req->secinfo.WPAenabled = 1;
                                assoc_req->secinfo.WPA2enabled = 1;
-                               assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
+                               assoc_req->secinfo.wep_enabled = 0;
                                assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
                        }
                } else {