Date: Sun, 3 May 2015 23:08:26 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282385 - head/sys/dev/wpi Message-ID: <201505032308.t43N8Qiv079958@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun May 3 23:08:25 2015 New Revision: 282385 URL: https://svnweb.freebsd.org/changeset/base/282385 Log: Check channels which are passed in IBSS mode. PR: kern/197143 Submitted by: Andriy Voskoboinyk <s3erios@gmail.com> Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun May 3 23:06:19 2015 (r282384) +++ head/sys/dev/wpi/if_wpi.c Sun May 3 23:08:25 2015 (r282385) @@ -3775,6 +3775,14 @@ wpi_config(struct wpi_softc *sc) sc->rxon.cck_mask = 0x0f; /* not yet negotiated */ sc->rxon.ofdm_mask = 0xff; /* not yet negotiated */ + /* XXX Current configuration may be unusable. */ + if (IEEE80211_IS_CHAN_NOADHOC(c) && sc->rxon.mode == WPI_MODE_IBSS) { + device_printf(sc->sc_dev, + "%s: invalid channel (%d) selected for IBSS mode\n", + __func__, ieee80211_chan2ieee(ic, c)); + return EINVAL; + } + if ((error = wpi_send_rxon(sc, 0, 0)) != 0) { device_printf(sc->sc_dev, "%s: could not send RXON\n", __func__);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505032308.t43N8Qiv079958>