> -----Original Message----- > From: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> > Sent: Saturday, January 13, 2024 6:50 AM > To: linux-wireless@xxxxxxxxxxxxxxx > Cc: Ping-Ke Shih <pkshih@xxxxxxxxxxx>; Larry Finger <Larry.Finger@xxxxxxxxxxxx> > Subject: [PATCH] wifi: rtlwifi: rtl8192de: Fix byte order of chip version > > The chip version stored in the efuse is currently assumed to be in > big endian order: > > #define EEPROME_CHIP_VERSION_L 0x3FF > #define EEPROME_CHIP_VERSION_H 0x3FE > > But other 2-byte things in the efuse are stored in little endian order. > For example, the EEPROM ID, the vendor ID, the product ID. > > The out-of-kernel driver for the USB version of the chip uses the same > macros and version detection code as this driver. I run vendor driver with 8192DU, and got correct 0xcc33. efuse[EEPROME_CHIP_VERSION_H] = efuse[0x3fe] = cutvalue[1] = 0xcc efuse[EEPROME_CHIP_VERSION_L] = efuse[0x3ff] = cutvalue[0] = 0x33 So, chhipvalue = (cutvalue[1] << 8) | cutvalue[0] = (0xcc << 8) | 0x33 = 0xcc33; > They recognise > 0xaa55, 0x9966, and 0xcc33 as correct versions. With the original > macros, my device's version is the unrecognised value of 0x33cc. This > seems like a mistake. Can you check the efuse value you read out?