aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/sdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/sdio.c')
-rw-r--r--drivers/net/wireless/wl12xx/sdio.c27
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};
52MODULE_DEVICE_TABLE(sdio, wl1271_devices); 52MODULE_DEVICE_TABLE(sdio, wl1271_devices);
53 53
54static 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
54static inline struct sdio_func *wl_to_func(struct wl1271 *wl) 61static 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
209static int __devinit wl1271_probe(struct sdio_func *func, 217static 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");
343MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>"); 362MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
344MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>"); 363MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
345MODULE_FIRMWARE(WL1271_FW_NAME); 364MODULE_FIRMWARE(WL1271_FW_NAME);
346MODULE_FIRMWARE(WL1271_AP_FW_NAME); 365MODULE_FIRMWARE(WL128X_FW_NAME);
366MODULE_FIRMWARE(WL127X_AP_FW_NAME);
367MODULE_FIRMWARE(WL128X_AP_FW_NAME);