forked from rubenslte/android_kernel_samsung_msm8226
radio: tavarua: Use proper length to read the data
- Copies the entire 16 bytes including the unused last byte of RX_STATIONS_0. - Userspace will get wrong frequency. - Use proper length to read the data when HOST receives search list event. Change-Id: I69ecc01c327c4f803dd594a95ca539339bdec574 CRs-Fixed: 468619 Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
This commit is contained in:
@@ -1003,7 +1003,7 @@ static void tavarua_handle_interrupts(struct tavarua_device *radio)
|
||||
radio->xfr_bytes_left = radio->registers[XFRCTRL+1]*2;
|
||||
if (radio->xfr_bytes_left > 14) {
|
||||
copy_from_xfr(radio, TAVARUA_BUF_SRCH_LIST,
|
||||
XFR_REG_NUM);
|
||||
RX_STATIONS0_LEN);
|
||||
request_read_xfr(radio, RX_STATIONS_1);
|
||||
} else if (radio->xfr_bytes_left) {
|
||||
FMDBG("In else RX_STATIONS_0\n");
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define BYTES_PER_BLOCK (3)
|
||||
#define MAX_PS_LENGTH (96)
|
||||
#define MAX_RT_LENGTH (64)
|
||||
#define RX_STATIONS0_LEN (15)
|
||||
|
||||
#define XFRDAT0 (0x20)
|
||||
#define XFRDAT1 (0x21)
|
||||
|
||||
Reference in New Issue
Block a user