switch (Bandwidth) {
                case HT_CHANNEL_WIDTH_20:
-                               if (priv->card_8192_version == VERSION_819xU_A
+                               if (priv->card_8192_version == VERSION_819XU_A
                                        || priv->card_8192_version
-                                       == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */
+                                       == VERSION_819XU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */
                                        rtl8192_phy_SetRFReg(dev,
                                                (enum rf90_radio_path_e)eRFPath,
                                                0x0b, bMask12Bits, 0x100); /* phy para:1ba */
                                        }
                                break;
                case HT_CHANNEL_WIDTH_20_40:
-                               if (priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */
+                               if (priv->card_8192_version == VERSION_819XU_A || priv->card_8192_version == VERSION_819XU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */
                                        rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x0b, bMask12Bits, 0x300); /* phy para:3ba */
                                        rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x2c, bMask12Bits, 0x3df);
                                        rtl8192_phy_SetRFReg(dev, (enum rf90_radio_path_e)eRFPath, 0x0e, bMask12Bits, 0x0a1);
 
        TXCMD_XXXX_CTRL,
 } DCMD_TXCMD_OP;
 
+enum version_819xu {
+       VERSION_819XU_A, // A-cut
+       VERSION_819XU_B, // B-cut
+       VERSION_819XU_C,// C-cut
+};
+
 typedef struct r8192_priv {
        struct usb_device *udev;
        /* For maintain info from eeprom */
        /* O: rtl8192, 1: rtl8185 V B/C, 2: rtl8185 V D */
        short card_8192;
        /* If TCR reports card V B/C, this discriminates */
-       u8 card_8192_version;
+       enum version_819xu card_8192_version;
        short enable_gpio0;
        enum card_type {
                PCI, MINIPCI, CARDBUS, USB
 
        } else {
                priv->eeprom_vid = 0;
                priv->eeprom_pid = 0;
-               priv->card_8192_version = VERSION_819xU_B;
+               priv->card_8192_version = VERSION_819XU_B;
                priv->eeprom_ChannelPlan = 0;
                priv->eeprom_CustomerID = 0;
        }
        priv->rf_type = RTL819X_DEFAULT_RF_TYPE; /* default 1T2R */
        priv->rf_chip = RF_8256;
 
-       if (priv->card_8192_version == (u8)VERSION_819xU_A) {
+       if (priv->card_8192_version == VERSION_819XU_A) {
                /* read Tx power gain offset of legacy OFDM to HT rate */
                if (bLoad_From_EEPOM) {
                        ret = eprom_read(dev, (EEPROM_TxPowerDiff >> 1));
                 * 92U does not enable TX power tracking.
                 */
                priv->ThermalMeter[0] = priv->EEPROMThermalMeter;
-       } /* end if VersionID == VERSION_819xU_A */
+       } /* end if VersionID == VERSION_819XU_A */
 
        /* for dlink led */
        switch (priv->eeprom_CustomerID) {
 
        rtl8192_phy_configmac(dev);
 
-       if (priv->card_8192_version == (u8)VERSION_819xU_A) {
+       if (priv->card_8192_version == VERSION_819XU_A) {
                rtl8192_phy_getTxPower(dev);
                rtl8192_phy_setTxPower(dev, priv->chan);
        }
 
 #ifndef R8192_HW
 #define R8192_HW
 
-typedef enum _VERSION_819xU {
-       VERSION_819xU_A, // A-cut
-       VERSION_819xU_B, // B-cut
-       VERSION_819xU_C,// C-cut
-} VERSION_819xU, *PVERSION_819xU;
 //added for different RF type
 typedef enum _RT_RF_TYPE_DEF {
        RF_1T2R = 0,
 
 
        /* ----Enable XSTAL ---- */
        write_nic_byte_E(dev, 0x5e, 0x00);
-       if (priv->card_8192_version == (u8)VERSION_819xU_A) {
+       if (priv->card_8192_version == VERSION_819XU_A) {
                /* Antenna gain offset from B/C/D to A */
                reg_u32 = priv->AntennaTxPwDiff[1]<<4 |
                           priv->AntennaTxPwDiff[0];
 
                switch (CurrentCmd->cmd_id) {
                case CMD_ID_SET_TX_PWR_LEVEL:
-                       if (priv->card_8192_version == (u8)VERSION_819xU_A)
+                       if (priv->card_8192_version == VERSION_819XU_A)
                                /* consider it later! */
                                rtl8192_SetTxPowerLevel(dev, channel);
                        break;