Lines 384-389
Link Here
|
384 |
} |
384 |
} |
385 |
|
385 |
|
386 |
WPI_LOCK_INIT(sc); |
386 |
WPI_LOCK_INIT(sc); |
|
|
387 |
WPI_NT_LOCK_INIT(sc); |
387 |
WPI_TXQ_LOCK_INIT(sc); |
388 |
WPI_TXQ_LOCK_INIT(sc); |
388 |
|
389 |
|
389 |
/* Allocate DMA memory for firmware transfers. */ |
390 |
/* Allocate DMA memory for firmware transfers. */ |
Lines 681-686
Link Here
|
681 |
|
682 |
|
682 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); |
683 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); |
683 |
WPI_TXQ_LOCK_DESTROY(sc); |
684 |
WPI_TXQ_LOCK_DESTROY(sc); |
|
|
685 |
WPI_NT_LOCK_DESTROY(sc); |
684 |
WPI_LOCK_DESTROY(sc); |
686 |
WPI_LOCK_DESTROY(sc); |
685 |
return 0; |
687 |
return 0; |
686 |
} |
688 |
} |
Lines 1582-1593
Link Here
|
1582 |
struct wpi_node *wn = WPI_NODE(ni); |
1584 |
struct wpi_node *wn = WPI_NODE(ni); |
1583 |
|
1585 |
|
1584 |
if (wn->id != WPI_ID_UNDEFINED) { |
1586 |
if (wn->id != WPI_ID_UNDEFINED) { |
1585 |
WPI_LOCK(sc); |
1587 |
WPI_NT_LOCK(sc); |
1586 |
if (wpi_check_node_entry(sc, wn->id)) { |
1588 |
if (wpi_check_node_entry(sc, wn->id)) { |
1587 |
wpi_del_node_entry(sc, wn->id); |
1589 |
wpi_del_node_entry(sc, wn->id); |
1588 |
wpi_del_node(sc, ni); |
1590 |
wpi_del_node(sc, ni); |
1589 |
} |
1591 |
} |
1590 |
WPI_UNLOCK(sc); |
1592 |
WPI_NT_UNLOCK(sc); |
1591 |
} |
1593 |
} |
1592 |
|
1594 |
|
1593 |
sc->sc_node_free(ni); |
1595 |
sc->sc_node_free(ni); |
Lines 2095-2101
Link Here
|
2095 |
le32toh(*status)); |
2097 |
le32toh(*status)); |
2096 |
|
2098 |
|
2097 |
if (le32toh(*status) & 1) { |
2099 |
if (le32toh(*status) & 1) { |
|
|
2100 |
WPI_NT_LOCK(sc); |
2098 |
wpi_clear_node_table(sc); |
2101 |
wpi_clear_node_table(sc); |
|
|
2102 |
WPI_NT_UNLOCK(sc); |
2099 |
ieee80211_runtask(ic, &sc->sc_radiooff_task); |
2103 |
ieee80211_runtask(ic, &sc->sc_radiooff_task); |
2100 |
return; |
2104 |
return; |
2101 |
} |
2105 |
} |
Lines 2557-2563
Link Here
|
2557 |
if (wn->id == WPI_ID_UNDEFINED && |
2561 |
if (wn->id == WPI_ID_UNDEFINED && |
2558 |
(vap->iv_opmode == IEEE80211_M_IBSS || |
2562 |
(vap->iv_opmode == IEEE80211_M_IBSS || |
2559 |
vap->iv_opmode == IEEE80211_M_AHDEMO)) { |
2563 |
vap->iv_opmode == IEEE80211_M_AHDEMO)) { |
|
|
2564 |
WPI_NT_LOCK(sc); |
2560 |
error = wpi_add_ibss_node(sc, ni); |
2565 |
error = wpi_add_ibss_node(sc, ni); |
|
|
2566 |
WPI_NT_UNLOCK(sc); |
2561 |
if (error != 0) { |
2567 |
if (error != 0) { |
2562 |
device_printf(sc->sc_dev, |
2568 |
device_printf(sc->sc_dev, |
2563 |
"%s: could not add IBSS node, error %d\n", |
2569 |
"%s: could not add IBSS node, error %d\n", |
Lines 3501-3510
Link Here
|
3501 |
error = wpi_cmd(sc, WPI_CMD_RXON_ASSOC, &rxon_assoc, |
3507 |
error = wpi_cmd(sc, WPI_CMD_RXON_ASSOC, &rxon_assoc, |
3502 |
sizeof (struct wpi_assoc), async); |
3508 |
sizeof (struct wpi_assoc), async); |
3503 |
} else { |
3509 |
} else { |
|
|
3510 |
if (async) |
3511 |
WPI_NT_LOCK(sc); |
3512 |
|
3504 |
error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon, |
3513 |
error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon, |
3505 |
sizeof (struct wpi_rxon), async); |
3514 |
sizeof (struct wpi_rxon), async); |
3506 |
|
3515 |
|
3507 |
wpi_clear_node_table(sc); |
3516 |
wpi_clear_node_table(sc); |
|
|
3517 |
|
3518 |
if (async) |
3519 |
WPI_NT_UNLOCK(sc); |
3508 |
} |
3520 |
} |
3509 |
if (error != 0) { |
3521 |
if (error != 0) { |
3510 |
device_printf(sc->sc_dev, "RXON command failed, error %d\n", |
3522 |
device_printf(sc->sc_dev, "RXON command failed, error %d\n", |
Lines 4069-4075
Link Here
|
4069 |
|
4081 |
|
4070 |
if (vap->iv_opmode == IEEE80211_M_STA) { |
4082 |
if (vap->iv_opmode == IEEE80211_M_STA) { |
4071 |
/* Add BSS node. */ |
4083 |
/* Add BSS node. */ |
|
|
4084 |
WPI_NT_LOCK(sc); |
4072 |
error = wpi_add_sta_node(sc, ni); |
4085 |
error = wpi_add_sta_node(sc, ni); |
|
|
4086 |
WPI_NT_UNLOCK(sc); |
4073 |
if (error != 0) { |
4087 |
if (error != 0) { |
4074 |
device_printf(sc->sc_dev, |
4088 |
device_printf(sc->sc_dev, |
4075 |
"%s: could not add BSS node, error %d\n", __func__, |
4089 |
"%s: could not add BSS node, error %d\n", __func__, |