aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1251_main.c
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2009-08-07 06:33:11 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:37 -0400
commit08d9f57251841e4870cfd286e867ffcbef81d9a4 (patch)
tree98cff0725677bd4126b9e4fb0a095fe1be83741e /drivers/net/wireless/wl12xx/wl1251_main.c
parent6c766f413c81d5a11588552934fa093eab6ae06e (diff)
wl1251: introduce wl1251_if_operations struct
Introduce an ops struct with read, write, and reset functions to abstract away the details of the wl1251 bus interface. Doing this will allow SDIO to coexist with SPI by supplying its own I/O routines. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1251_main.c')
-rw-r--r--drivers/net/wireless/wl12xx/wl1251_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c
index 953cdb4fd38f..0f30d0a62aa9 100644
--- a/drivers/net/wireless/wl12xx/wl1251_main.c
+++ b/drivers/net/wireless/wl12xx/wl1251_main.c
@@ -168,8 +168,7 @@ static int wl1251_chip_wakeup(struct wl1251 *wl)
168 168
169 wl1251_power_on(wl); 169 wl1251_power_on(wl);
170 msleep(wl->chip.power_on_sleep); 170 msleep(wl->chip.power_on_sleep);
171 wl1251_spi_reset(wl); 171 wl->if_ops->reset(wl);
172 wl1251_spi_init(wl);
173 172
174 /* We don't need a real memory partition here, because we only want 173 /* We don't need a real memory partition here, because we only want
175 * to use the registers at this point. */ 174 * to use the registers at this point. */
@@ -1192,6 +1191,8 @@ static int wl1251_init_ieee80211(struct wl1251 *wl)
1192 return 0; 1191 return 0;
1193} 1192}
1194 1193
1194extern struct wl1251_if_operations wl1251_spi_ops;
1195
1195#define WL1251_DEFAULT_CHANNEL 1 1196#define WL1251_DEFAULT_CHANNEL 1
1196static int __devinit wl1251_probe(struct spi_device *spi) 1197static int __devinit wl1251_probe(struct spi_device *spi)
1197{ 1198{
@@ -1219,6 +1220,7 @@ static int __devinit wl1251_probe(struct spi_device *spi)
1219 wl->hw = hw; 1220 wl->hw = hw;
1220 dev_set_drvdata(&spi->dev, wl); 1221 dev_set_drvdata(&spi->dev, wl);
1221 wl->spi = spi; 1222 wl->spi = spi;
1223 wl->if_ops = &wl1251_spi_ops;
1222 1224
1223 wl->data_in_count = 0; 1225 wl->data_in_count = 0;
1224 1226