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:
Venkateshwarlu Domakonda
2013-05-21 14:27:12 +05:30
parent ef19368655
commit f9567a35df
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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");
+1
View File
@@ -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)