View | Details | Raw Unified | Return to bug 197143 | Differences between
and this patch

Collapse All | Expand All

(-)sys/dev/wpi/if_wpi.c (-14 / +24 lines)
Lines 228-233 Link Here
228
static int	wpi_auth(struct wpi_softc *, struct ieee80211vap *);
228
static int	wpi_auth(struct wpi_softc *, struct ieee80211vap *);
229
static void	wpi_update_beacon(struct ieee80211vap *, int);
229
static void	wpi_update_beacon(struct ieee80211vap *, int);
230
static int	wpi_setup_beacon(struct wpi_softc *, struct ieee80211_node *);
230
static int	wpi_setup_beacon(struct wpi_softc *, struct ieee80211_node *);
231
static void	wpi_newassoc(struct ieee80211_node *, int);
231
static int	wpi_run(struct wpi_softc *, struct ieee80211vap *);
232
static int	wpi_run(struct wpi_softc *, struct ieee80211vap *);
232
static int	wpi_key_alloc(struct ieee80211vap *, struct ieee80211_key *,
233
static int	wpi_key_alloc(struct ieee80211vap *, struct ieee80211_key *,
233
		    ieee80211_keyix *, ieee80211_keyix *);
234
		    ieee80211_keyix *, ieee80211_keyix *);
Lines 500-505 Link Here
500
	ic->ic_wme.wme_update = wpi_updateedca;
501
	ic->ic_wme.wme_update = wpi_updateedca;
501
	ic->ic_update_promisc = wpi_update_promisc;
502
	ic->ic_update_promisc = wpi_update_promisc;
502
	ic->ic_update_mcast = wpi_update_mcast;
503
	ic->ic_update_mcast = wpi_update_mcast;
504
	ic->ic_newassoc = wpi_newassoc;
503
	ic->ic_scan_start = wpi_scan_start;
505
	ic->ic_scan_start = wpi_scan_start;
504
	ic->ic_scan_end = wpi_scan_end;
506
	ic->ic_scan_end = wpi_scan_end;
505
	ic->ic_set_channel = wpi_set_channel;
507
	ic->ic_set_channel = wpi_set_channel;
Lines 2563-2582 Link Here
2563
	if (ismcast || type != IEEE80211_FC0_TYPE_DATA)
2565
	if (ismcast || type != IEEE80211_FC0_TYPE_DATA)
2564
		tx.id = WPI_ID_BROADCAST;
2566
		tx.id = WPI_ID_BROADCAST;
2565
	else {
2567
	else {
2566
		if (wn->id == WPI_ID_UNDEFINED &&
2567
		    (vap->iv_opmode == IEEE80211_M_IBSS ||
2568
		    vap->iv_opmode == IEEE80211_M_AHDEMO)) {
2569
			WPI_NT_LOCK(sc);
2570
			error = wpi_add_ibss_node(sc, ni);
2571
			WPI_NT_UNLOCK(sc);
2572
			if (error != 0) {
2573
				device_printf(sc->sc_dev,
2574
				    "%s: could not add IBSS node, error %d\n",
2575
				    __func__, error);
2576
				goto fail;
2577
			}
2578
		}
2579
2580
		if (wn->id == WPI_ID_UNDEFINED) {
2568
		if (wn->id == WPI_ID_UNDEFINED) {
2581
			device_printf(sc->sc_dev,
2569
			device_printf(sc->sc_dev,
2582
			    "%s: undefined node id\n", __func__);
2570
			    "%s: undefined node id\n", __func__);
Lines 4019-4024 Link Here
4019
	WPI_UNLOCK(sc);
4007
	WPI_UNLOCK(sc);
4020
}
4008
}
4021
4009
4010
static void
4011
wpi_newassoc(struct ieee80211_node *ni, int isnew)
4012
{
4013
	struct ieee80211vap *vap = ni->ni_vap;
4014
	struct wpi_softc *sc = ni->ni_ic->ic_ifp->if_softc;
4015
	struct wpi_node *wn = WPI_NODE(ni);
4016
	int error;
4017
4018
	WPI_NT_LOCK(sc);
4019
4020
	DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__);
4021
4022
	if (vap->iv_opmode != IEEE80211_M_STA && wn->id == WPI_ID_UNDEFINED) {
4023
		if ((error = wpi_add_ibss_node(sc, ni)) != 0) {
4024
			device_printf(sc->sc_dev,
4025
			    "%s: could not add IBSS node, error %d\n",
4026
			    __func__, error);
4027
		}
4028
	}
4029
	WPI_NT_UNLOCK(sc);
4030
}
4031
4022
static int
4032
static int
4023
wpi_run(struct wpi_softc *sc, struct ieee80211vap *vap)
4033
wpi_run(struct wpi_softc *sc, struct ieee80211vap *vap)
4024
{
4034
{

Return to bug 197143