| 495 | | IEEE80211_ADDR_COPY(vap->iv_des_bssid, &ap_addr->sa_data); |
|---|
| 496 | | /* looks like a zero address disables */ |
|---|
| 497 | | if (IEEE80211_ADDR_EQ(vap->iv_des_bssid, zero_bssid)) |
|---|
| | 497 | |
|---|
| | 498 | /* |
|---|
| | 499 | * zero address corresponds to 'iwconfig ath0 ap off', which means |
|---|
| | 500 | * enable automatic choice of AP without actually forcing a |
|---|
| | 501 | * reassociation. |
|---|
| | 502 | * |
|---|
| | 503 | * broadcast address corresponds to 'iwconfig ath0 ap any', which |
|---|
| | 504 | * means scan for the current best AP. |
|---|
| | 505 | * |
|---|
| | 506 | * anything else specifies a particular AP. |
|---|
| | 507 | */ |
|---|
| | 508 | if (IEEE80211_ADDR_EQ(vap->iv_des_bssid, zero_bssid)) |
|---|
| 499 | | else |
|---|
| 500 | | vap->iv_flags |= IEEE80211_F_DESBSSID; |
|---|
| 501 | | if (IS_UP_AUTO(vap)) |
|---|
| 502 | | ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); |
|---|
| | 510 | else { |
|---|
| | 511 | IEEE80211_ADDR_COPY(vap->iv_des_bssid, &ap_addr->sa_data); |
|---|
| | 512 | if (IEEE80211_ADDR_EQ(vap->iv_des_bssid, broadcast_bssid)) |
|---|
| | 513 | vap->iv_flags &= ~IEEE80211_F_DESBSSID; |
|---|
| | 514 | else |
|---|
| | 515 | vap->iv_flags |= IEEE80211_F_DESBSSID; |
|---|
| | 516 | if (IS_UP_AUTO(vap)) |
|---|
| | 517 | ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); |
|---|
| | 518 | } |
|---|