Lines 1931-1936
Link Here
|
1931 |
int status = le32toh(stat->status); |
1931 |
int status = le32toh(stat->status); |
1932 |
|
1932 |
|
1933 |
KASSERT(data->ni != NULL, ("no node")); |
1933 |
KASSERT(data->ni != NULL, ("no node")); |
|
|
1934 |
KASSERT(data->m != NULL, ("no mbuf")); |
1934 |
|
1935 |
|
1935 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); |
1936 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); |
1936 |
|
1937 |
|
Lines 3245-3255
Link Here
|
3245 |
struct wpi_node *wn = WPI_NODE(ni); |
3246 |
struct wpi_node *wn = WPI_NODE(ni); |
3246 |
int error; |
3247 |
int error; |
3247 |
|
3248 |
|
|
|
3249 |
KASSERT(wn->id == WPI_ID_UNDEFINED, |
3250 |
("the node %d was added before", wn->id)); |
3251 |
|
3248 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); |
3252 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); |
3249 |
|
3253 |
|
3250 |
if (wn->id != WPI_ID_UNDEFINED) |
|
|
3251 |
return EINVAL; |
3252 |
|
3253 |
if ((wn->id = wpi_add_node_entry_adhoc(sc)) == WPI_ID_UNDEFINED) { |
3254 |
if ((wn->id = wpi_add_node_entry_adhoc(sc)) == WPI_ID_UNDEFINED) { |
3254 |
device_printf(sc->sc_dev, "%s: h/w table is full\n", __func__); |
3255 |
device_printf(sc->sc_dev, "%s: h/w table is full\n", __func__); |
3255 |
return ENOMEM; |
3256 |
return ENOMEM; |
Lines 3271-3284
Link Here
|
3271 |
struct wpi_cmd_del_node node; |
3272 |
struct wpi_cmd_del_node node; |
3272 |
int error; |
3273 |
int error; |
3273 |
|
3274 |
|
|
|
3275 |
KASSERT(wn->id != WPI_ID_UNDEFINED, ("undefined node id passed")); |
3276 |
|
3274 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); |
3277 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); |
3275 |
|
3278 |
|
3276 |
if (wn->id == WPI_ID_UNDEFINED) { |
|
|
3277 |
device_printf(sc->sc_dev, "%s: undefined node id passed\n", |
3278 |
__func__); |
3279 |
return; |
3280 |
} |
3281 |
|
3282 |
memset(&node, 0, sizeof node); |
3279 |
memset(&node, 0, sizeof node); |
3283 |
IEEE80211_ADDR_COPY(node.macaddr, ni->ni_macaddr); |
3280 |
IEEE80211_ADDR_COPY(node.macaddr, ni->ni_macaddr); |
3284 |
node.count = 1; |
3281 |
node.count = 1; |