Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170968
b: refs/heads/master
c: eb5b28d
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Oct 27, 2009
1 parent eb403fc commit 7355005
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a08048a3722a6b52c2b34e070c4e6a32ad19e0d
refs/heads/master: eb5b28d021a1b96050f7af46e9140eb0051cc6d8
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/wl1271_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,6 @@ static int wl1271_boot_run_firmware(struct wl1271 *wl)
* ready to receive event from the command mailbox
*/

/* enable gpio interrupts */
wl1271_boot_enable_interrupts(wl);

/* unmask required mbox events */
wl->event_mask = BSS_LOSE_EVENT_ID |
SCAN_COMPLETE_EVENT_ID;
Expand Down Expand Up @@ -540,6 +537,9 @@ int wl1271_boot(struct wl1271 *wl)
if (ret < 0)
goto out;

/* Enable firmware interrupts now */
wl1271_boot_enable_interrupts(wl);

/* set the wl1271 default filters */
wl->rx_config = WL1271_DEFAULT_RX_CONFIG;
wl->rx_filter = WL1271_DEFAULT_RX_FILTER;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/wl1271_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ int wl1271_hw_init(struct wl1271 *wl)

/* RX config */
ret = wl1271_init_rx_config(wl,
RX_CFG_PROMISCUOUS | RX_CFG_TSF,
RX_FILTER_OPTION_DEF);
RX_CFG_PROMISCUOUS | RX_CFG_TSF,
RX_FILTER_OPTION_DEF);
/* RX_CONFIG_OPTION_ANY_DST_ANY_BSS,
RX_FILTER_OPTION_FILTER_ALL); */
if (ret < 0)
Expand Down
42 changes: 30 additions & 12 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,35 +625,40 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)

ret = wl1271_setup(wl);
if (ret < 0)
goto out;
goto out_power_off;
break;
case CHIP_ID_1271_PG20:
wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1271 PG20)",
wl->chip.id);

ret = wl1271_setup(wl);
if (ret < 0)
goto out;
goto out_power_off;
break;
default:
wl1271_error("unsupported chip id: 0x%x", wl->chip.id);
ret = -ENODEV;
goto out;
goto out_power_off;
}

if (wl->fw == NULL) {
ret = wl1271_fetch_firmware(wl);
if (ret < 0)
goto out;
goto out_power_off;
}

/* No NVS from netlink, try to get it from the filesystem */
if (wl->nvs == NULL) {
ret = wl1271_fetch_nvs(wl);
if (ret < 0)
goto out;
goto out_power_off;
}

goto out;

out_power_off:
wl1271_power_off(wl);

out:
return ret;
}
Expand Down Expand Up @@ -749,13 +754,21 @@ int wl1271_plt_start(struct wl1271 *wl)

ret = wl1271_boot(wl);
if (ret < 0)
goto out;
goto out_power_off;

wl1271_notice("firmware booted in PLT mode (%s)", wl->chip.fw_ver);

ret = wl1271_plt_init(wl);
if (ret < 0)
goto out;
goto out_irq_disable;

goto out;

out_irq_disable:
wl1271_disable_interrupts(wl);

out_power_off:
wl1271_power_off(wl);

out:
mutex_unlock(&wl->mutex);
Expand Down Expand Up @@ -843,20 +856,25 @@ static int wl1271_op_start(struct ieee80211_hw *hw)

ret = wl1271_boot(wl);
if (ret < 0)
goto out;
goto out_power_off;

ret = wl1271_hw_init(wl);
if (ret < 0)
goto out;
goto out_irq_disable;

wl->state = WL1271_STATE_ON;

wl1271_info("firmware booted (%s)", wl->chip.fw_ver);

out:
if (ret < 0)
wl1271_power_off(wl);
goto out;

out_irq_disable:
wl1271_disable_interrupts(wl);

out_power_off:
wl1271_power_off(wl);

out:
mutex_unlock(&wl->mutex);

return ret;
Expand Down

0 comments on commit 7355005

Please sign in to comment.