* Send a management frame error response to the specified * station. If ni is associated with the station then use * it; otherwise allocate a temporary node suitable for * transmitting the frame and then free the reference so * it will go away as soon as the frame has been transmitted. */
| 427 | * it will go away as soon as the frame has been transmitted. |
| 428 | */ |
| 429 | void |
| 430 | ieee80211_send_error(struct ieee80211_node *ni, |
| 431 | const uint8_t mac[IEEE80211_ADDR_LEN], int subtype, int arg) |
| 432 | { |
| 433 | struct ieee80211vap *vap = ni->ni_vap; |
| 434 | int istmp; |
| 435 | |
| 436 | if (ni == vap->iv_bss) { |
| 437 | if (vap->iv_state != IEEE80211_S_RUN) { |
| 438 | /* |
| 439 | * XXX hack until we get rid of this routine. |
| 440 | * We can be called prior to the vap reaching |
| 441 | * run state under certain conditions in which |
| 442 | * case iv_bss->ni_chan will not be setup. |
| 443 | * Check for this explicitly and and just ignore |
| 444 | * the request. |
| 445 | */ |
| 446 | return; |
| 447 | } |
| 448 | ni = ieee80211_tmp_node(vap, mac); |
| 449 | if (ni == NULL) { |
| 450 | /* XXX msg */ |
| 451 | return; |
| 452 | } |
| 453 | istmp = 1; |
| 454 | } else |
| 455 | istmp = 0; |
| 456 | IEEE80211_SEND_MGMT(ni, subtype, arg); |
| 457 | if (istmp) |
| 458 | ieee80211_free_node(ni); |
| 459 | } |
| 460 | |
| 461 | int |
| 462 | ieee80211_alloc_challenge(struct ieee80211_node *ni) |
no test coverage detected