svn commit: r257743 - head/sys/dev/usb/wlan
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Nov 6 12:57:03 UTC 2013
Author: hselasky
Date: Wed Nov 6 12:57:01 2013
New Revision: 257743
URL: http://svnweb.freebsd.org/changeset/base/257743
Log:
Check for "ieee80211_vap_setup()" failure in all USB WLAN drivers.
MFC after: 1 week
Modified:
head/sys/dev/usb/wlan/if_rsu.c
head/sys/dev/usb/wlan/if_rum.c
head/sys/dev/usb/wlan/if_run.c
head/sys/dev/usb/wlan/if_uath.c
head/sys/dev/usb/wlan/if_upgt.c
head/sys/dev/usb/wlan/if_ural.c
head/sys/dev/usb/wlan/if_urtw.c
head/sys/dev/usb/wlan/if_urtwn.c
head/sys/dev/usb/wlan/if_zyd.c
Modified: head/sys/dev/usb/wlan/if_rsu.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rsu.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_rsu.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -481,8 +481,13 @@ rsu_vap_create(struct ieee80211com *ic,
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;
Modified: head/sys/dev/usb/wlan/if_rum.c
==============================================================================
--- head/sys/dev/usb/wlan/if_rum.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_rum.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -605,8 +605,13 @@ rum_vap_create(struct ieee80211com *ic,
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;
Modified: head/sys/dev/usb/wlan/if_run.c
==============================================================================
--- head/sys/dev/usb/wlan/if_run.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_run.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -804,7 +804,13 @@ run_vap_create(struct ieee80211com *ic,
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;
Modified: head/sys/dev/usb/wlan/if_uath.c
==============================================================================
--- head/sys/dev/usb/wlan/if_uath.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_uath.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -1073,8 +1073,13 @@ uath_vap_create(struct ieee80211com *ic,
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;
Modified: head/sys/dev/usb/wlan/if_upgt.c
==============================================================================
--- head/sys/dev/usb/wlan/if_upgt.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_upgt.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -1041,8 +1041,13 @@ upgt_vap_create(struct ieee80211com *ic,
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;
Modified: head/sys/dev/usb/wlan/if_ural.c
==============================================================================
--- head/sys/dev/usb/wlan/if_ural.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_ural.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -590,8 +590,13 @@ ural_vap_create(struct ieee80211com *ic,
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;
Modified: head/sys/dev/usb/wlan/if_urtw.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtw.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_urtw.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -1036,8 +1036,13 @@ urtw_vap_create(struct ieee80211com *ic,
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;
Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_urtwn.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -549,8 +549,13 @@ urtwn_vap_create(struct ieee80211com *ic
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;
Modified: head/sys/dev/usb/wlan/if_zyd.c
==============================================================================
--- head/sys/dev/usb/wlan/if_zyd.c Wed Nov 6 11:42:45 2013 (r257742)
+++ head/sys/dev/usb/wlan/if_zyd.c Wed Nov 6 12:57:01 2013 (r257743)
@@ -489,9 +489,14 @@ zyd_vap_create(struct ieee80211com *ic,
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;
More information about the svn-src-head
mailing list