diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/sdio.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/sdio.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/sdio.c b/drivers/net/wireless/wl12xx/sdio.c index b1c7d031c391..bcd4ad7ba90d 100644 --- a/drivers/net/wireless/wl12xx/sdio.c +++ b/drivers/net/wireless/wl12xx/sdio.c | |||
@@ -51,6 +51,13 @@ static const struct sdio_device_id wl1271_devices[] = { | |||
51 | }; | 51 | }; |
52 | MODULE_DEVICE_TABLE(sdio, wl1271_devices); | 52 | MODULE_DEVICE_TABLE(sdio, wl1271_devices); |
53 | 53 | ||
54 | static void wl1271_sdio_set_block_size(struct wl1271 *wl, unsigned int blksz) | ||
55 | { | ||
56 | sdio_claim_host(wl->if_priv); | ||
57 | sdio_set_block_size(wl->if_priv, blksz); | ||
58 | sdio_release_host(wl->if_priv); | ||
59 | } | ||
60 | |||
54 | static inline struct sdio_func *wl_to_func(struct wl1271 *wl) | 61 | static inline struct sdio_func *wl_to_func(struct wl1271 *wl) |
55 | { | 62 | { |
56 | return wl->if_priv; | 63 | return wl->if_priv; |
@@ -203,7 +210,8 @@ static struct wl1271_if_operations sdio_ops = { | |||
203 | .power = wl1271_sdio_set_power, | 210 | .power = wl1271_sdio_set_power, |
204 | .dev = wl1271_sdio_wl_to_dev, | 211 | .dev = wl1271_sdio_wl_to_dev, |
205 | .enable_irq = wl1271_sdio_enable_interrupts, | 212 | .enable_irq = wl1271_sdio_enable_interrupts, |
206 | .disable_irq = wl1271_sdio_disable_interrupts | 213 | .disable_irq = wl1271_sdio_disable_interrupts, |
214 | .set_block_size = wl1271_sdio_set_block_size, | ||
207 | }; | 215 | }; |
208 | 216 | ||
209 | static int __devinit wl1271_probe(struct sdio_func *func, | 217 | static int __devinit wl1271_probe(struct sdio_func *func, |
@@ -212,6 +220,7 @@ static int __devinit wl1271_probe(struct sdio_func *func, | |||
212 | struct ieee80211_hw *hw; | 220 | struct ieee80211_hw *hw; |
213 | const struct wl12xx_platform_data *wlan_data; | 221 | const struct wl12xx_platform_data *wlan_data; |
214 | struct wl1271 *wl; | 222 | struct wl1271 *wl; |
223 | unsigned long irqflags; | ||
215 | int ret; | 224 | int ret; |
216 | 225 | ||
217 | /* We are only able to handle the wlan function */ | 226 | /* We are only able to handle the wlan function */ |
@@ -230,6 +239,9 @@ static int __devinit wl1271_probe(struct sdio_func *func, | |||
230 | /* Grab access to FN0 for ELP reg. */ | 239 | /* Grab access to FN0 for ELP reg. */ |
231 | func->card->quirks |= MMC_QUIRK_LENIENT_FN0; | 240 | func->card->quirks |= MMC_QUIRK_LENIENT_FN0; |
232 | 241 | ||
242 | /* Use block mode for transferring over one block size of data */ | ||
243 | func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; | ||
244 | |||
233 | wlan_data = wl12xx_get_platform_data(); | 245 | wlan_data = wl12xx_get_platform_data(); |
234 | if (IS_ERR(wlan_data)) { | 246 | if (IS_ERR(wlan_data)) { |
235 | ret = PTR_ERR(wlan_data); | 247 | ret = PTR_ERR(wlan_data); |
@@ -239,9 +251,16 @@ static int __devinit wl1271_probe(struct sdio_func *func, | |||
239 | 251 | ||
240 | wl->irq = wlan_data->irq; | 252 | wl->irq = wlan_data->irq; |
241 | wl->ref_clock = wlan_data->board_ref_clock; | 253 | wl->ref_clock = wlan_data->board_ref_clock; |
254 | wl->tcxo_clock = wlan_data->board_tcxo_clock; | ||
255 | wl->platform_quirks = wlan_data->platform_quirks; | ||
256 | |||
257 | if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) | ||
258 | irqflags = IRQF_TRIGGER_RISING; | ||
259 | else | ||
260 | irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; | ||
242 | 261 | ||
243 | ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq, | 262 | ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq, |
244 | IRQF_TRIGGER_HIGH | IRQF_ONESHOT, | 263 | irqflags, |
245 | DRIVER_NAME, wl); | 264 | DRIVER_NAME, wl); |
246 | if (ret < 0) { | 265 | if (ret < 0) { |
247 | wl1271_error("request_irq() failed: %d", ret); | 266 | wl1271_error("request_irq() failed: %d", ret); |
@@ -343,4 +362,6 @@ MODULE_LICENSE("GPL"); | |||
343 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); | 362 | MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); |
344 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); | 363 | MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); |
345 | MODULE_FIRMWARE(WL1271_FW_NAME); | 364 | MODULE_FIRMWARE(WL1271_FW_NAME); |
346 | MODULE_FIRMWARE(WL1271_AP_FW_NAME); | 365 | MODULE_FIRMWARE(WL128X_FW_NAME); |
366 | MODULE_FIRMWARE(WL127X_AP_FW_NAME); | ||
367 | MODULE_FIRMWARE(WL128X_AP_FW_NAME); | ||