1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

Check for "ieee80211_vap_setup()" failure in all USB WLAN drivers.

MFC after:	1 week
This commit is contained in:
Hans Petter Selasky 2013-11-06 12:57:01 +00:00
parent a12e93c5ba
commit bb2f69e83f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257743
9 changed files with 63 additions and 17 deletions

View File

@ -481,8 +481,13 @@ rsu_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
if (uvp == NULL)
return (NULL);
vap = &uvp->vap;
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags, bssid, mac) != 0) {
/* out of memory */
free(uvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
uvp->newstate = vap->iv_newstate;

View File

@ -605,8 +605,13 @@ rum_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
return NULL;
vap = &rvp->vap;
/* enable s/w bmiss handling for sta mode */
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) {
/* out of memory */
free(rvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
rvp->newstate = vap->iv_newstate;

View File

@ -804,7 +804,13 @@ run_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
if (rvp == NULL)
return (NULL);
vap = &rvp->vap;
ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit,
opmode, flags, bssid, mac) != 0) {
/* out of memory */
free(rvp, M_80211_VAP);
return (NULL);
}
vap->iv_key_update_begin = run_key_update_begin;
vap->iv_key_update_end = run_key_update_end;

View File

@ -1073,8 +1073,13 @@ uath_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
return (NULL);
vap = &uvp->vap;
/* enable s/w bmiss handling for sta mode */
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) {
/* out of memory */
free(uvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
uvp->newstate = vap->iv_newstate;

View File

@ -1041,8 +1041,13 @@ upgt_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
return NULL;
vap = &uvp->vap;
/* enable s/w bmiss handling for sta mode */
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) {
/* out of memory */
free(uvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
uvp->newstate = vap->iv_newstate;

View File

@ -590,8 +590,13 @@ ural_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
return NULL;
vap = &uvp->vap;
/* enable s/w bmiss handling for sta mode */
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) {
/* out of memory */
free(uvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
uvp->newstate = vap->iv_newstate;

View File

@ -1036,8 +1036,13 @@ urtw_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
return (NULL);
vap = &uvp->vap;
/* enable s/w bmiss handling for sta mode */
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) {
/* out of memory */
free(uvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
uvp->newstate = vap->iv_newstate;

View File

@ -549,8 +549,13 @@ urtwn_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
return (NULL);
vap = &uvp->vap;
/* enable s/w bmiss handling for sta mode */
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) {
/* out of memory */
free(uvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
uvp->newstate = vap->iv_newstate;

View File

@ -489,9 +489,14 @@ zyd_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit,
if (zvp == NULL)
return (NULL);
vap = &zvp->vap;
/* enable s/w bmiss handling for sta mode */
ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac);
if (ieee80211_vap_setup(ic, vap, name, unit, opmode,
flags | IEEE80211_CLONE_NOBEACONS, bssid, mac) != 0) {
/* out of memory */
free(zvp, M_80211_VAP);
return (NULL);
}
/* override state transition machine */
zvp->newstate = vap->iv_newstate;