Don't panic the kernel if we run wpa_supplicant on a hostap VAP.

Reviewed by:	adrian
This commit is contained in:
Rui Paulo 2013-06-29 06:36:42 +00:00
parent 0a943e59c9
commit edd39a8e2d

View File

@ -1589,7 +1589,9 @@ ieee80211_ioctl_setmlme(struct ieee80211vap *vap, struct ieee80211req *ireq)
mlme.im_op == IEEE80211_MLME_ASSOC)
return setmlme_assoc_sta(vap, mlme.im_macaddr,
vap->iv_des_ssid[0].len, vap->iv_des_ssid[0].ssid);
else if (mlme.im_op == IEEE80211_MLME_ASSOC)
else if ((vap->iv_opmode == IEEE80211_M_IBSS ||
vap->iv_opmode == IEEE80211_M_AHDEMO) &&
mlme.im_op == IEEE80211_MLME_ASSOC)
return setmlme_assoc_adhoc(vap, mlme.im_macaddr,
mlme.im_ssid_len, mlme.im_ssid);
else