Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224265
b: refs/heads/master
c: 71125ab
h: refs/heads/master
i:
  224263: 5983ddf
v: v3
  • Loading branch information
Eliad Peller authored and John W. Linville committed Nov 15, 2010
1 parent d28bdf3 commit 99b14c7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 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: f8d9802f66eda9ff14f7667f99a46b31e9a9e273
refs/heads/master: 71125abdf0c297adc00dc5632f0318b2397286f5
33 changes: 20 additions & 13 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,18 +950,19 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
struct wiphy *wiphy = hw->wiphy;
int retries = WL1271_BOOT_RETRIES;
int ret = 0;
bool booted = false;

wl1271_debug(DEBUG_MAC80211, "mac80211 add interface type %d mac %pM",
vif->type, vif->addr);

mutex_lock(&wl->mutex);
if (wl->vif) {
wl1271_debug(DEBUG_MAC80211,
"multiple vifs are not supported yet");
ret = -EBUSY;
goto out;
}

wl->vif = vif;

switch (vif->type) {
case NL80211_IFTYPE_STATION:
wl->bss_type = BSS_TYPE_STA_BSS;
Expand Down Expand Up @@ -999,15 +1000,8 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
if (ret < 0)
goto irq_disable;

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

/* update hw/fw version info in wiphy struct */
wiphy->hw_version = wl->chip.id;
strncpy(wiphy->fw_version, wl->chip.fw_ver,
sizeof(wiphy->fw_version));

goto out;
booted = true;
break;

irq_disable:
wl1271_disable_interrupts(wl);
Expand All @@ -1025,8 +1019,21 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
wl1271_power_off(wl);
}

wl1271_error("firmware boot failed despite %d retries",
WL1271_BOOT_RETRIES);
if (!booted) {
wl1271_error("firmware boot failed despite %d retries",
WL1271_BOOT_RETRIES);
goto out;
}

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

/* update hw/fw version info in wiphy struct */
wiphy->hw_version = wl->chip.id;
strncpy(wiphy->fw_version, wl->chip.fw_ver,
sizeof(wiphy->fw_version));

out:
mutex_unlock(&wl->mutex);

Expand Down

0 comments on commit 99b14c7

Please sign in to comment.