wl1251: fix ELP_CTRL register reads
authorGrazvydas Ignotas <notasas@gmail.com>
Tue, 8 Jun 2010 11:33:31 +0000 (14:33 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 31 Oct 2010 20:10:34 +0000 (22:10 +0200)
commit7fa4170aeaefddeba8a20baa33f76040909ddbfb
tree141070fa8f4828d58e3c88e2b543aab00a929363
parent612f5a8df2425b13b76817efdcbb2f694c8e5e23
wl1251: fix ELP_CTRL register reads

Reading the ELP_CTRL register with sdio_readb causes problems because
hardware seems to be performing a write using stuff bits in the request
(those bits contain write data in write request). This indicates that it
actually expects RAW (read after write) type of request, so perform that
when reading ELP_CTRL instead. Also cache last written value so we know
what to write when doing RAW request.

Because of the above it was not possible to wake the chip from ELP power
saving mode, PM had to be disabled to have the driver usable in SDIO
mode. After this patch PM is functional.

For backporting to 2.6.34 or earlier, this patch depends on
6c1f716e8154ee9315534782b9b1eedea0559a24, which adds the
required SDIO funcion.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/wl1251_sdio.c