[PATCH 0/2] staging: rtl8723au: include/rtl8723a_hal.h: fix firmware header struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Apparently, there is some error in struct rt_8723a_firmware_hdr. Indeed,
according to the comments in the code, the first 6 fields should be confined
in the first 8 bytes, but they actually occupy 9 bytes. Moreover, the total
size of the struct is 33 bytes, while function rtl8723a_FirmwareDownload() in
hal/rtl8723a_hal_init.c assumes a 32-byte-long header.

The "guilty" field is probably Rsvd1, which in similar drivers (e.g.,
rtl8723ae), has type u8, while in this case has type u16. Therefore, the first
patch in this patchset assumes that the type of Rsvd is wrong and changes it
to u8.

The second patch also changes struct rt_8723a_firmware_hdr by making its other
fields use the __leXX types in order to fix some sparse warnings.


Daniele Alessandrelli (2):
  staging: rtl8723au: include/rtl8723a_hal.h: fix Rsvd1 size in fw
    header struct
  staging: rtl8723au: include/rtl8723a_hal.h: use __leXX types in fw
    header struct

 drivers/staging/rtl8723au/include/rtl8723a_hal.h | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

-- 
1.8.3.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux