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

Collapse All | Expand All

(-)sys/dev/wpi/if_wpi.c (-21 / +28 lines)
Lines 3648-3679 Link Here
3648
3648
3649
		error = wpi_cmd(sc, WPI_CMD_RXON_ASSOC, &rxon_assoc,
3649
		error = wpi_cmd(sc, WPI_CMD_RXON_ASSOC, &rxon_assoc,
3650
		    sizeof (struct wpi_assoc), async);
3650
		    sizeof (struct wpi_assoc), async);
3651
		if (error != 0) {
3652
			device_printf(sc->sc_dev,
3653
			    "RXON_ASSOC command failed, error %d\n", error);
3654
			return error;
3655
		}
3651
	} else {
3656
	} else {
3652
		if (async)
3657
		if (async) {
3653
			WPI_NT_LOCK(sc);
3658
			WPI_NT_LOCK(sc);
3654
3659
			error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon,
3655
		error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon,
3660
			    sizeof (struct wpi_rxon), async);
3656
		    sizeof (struct wpi_rxon), async);
3661
			if (error == 0)
3657
3662
				wpi_clear_node_table(sc);
3658
		wpi_clear_node_table(sc);
3659
3660
		if (async)
3661
			WPI_NT_UNLOCK(sc);
3663
			WPI_NT_UNLOCK(sc);
3662
	}
3664
		} else {
3663
	if (error != 0) {
3665
			error = wpi_cmd(sc, WPI_CMD_RXON, &sc->rxon,
3664
		device_printf(sc->sc_dev, "RXON command failed, error %d\n",
3666
			    sizeof (struct wpi_rxon), async);
3665
		    error);
3667
			if (error == 0)
3666
		return error;
3668
				wpi_clear_node_table(sc);
3667
	}
3669
		}
3668
3670
3669
	/* Configuration has changed, set Tx power accordingly. */
3671
		if (error != 0) {
3670
	if ((error = wpi_set_txpower(sc, async)) != 0) {
3672
			device_printf(sc->sc_dev,
3671
		device_printf(sc->sc_dev,
3673
			    "RXON command failed, error %d\n", error);
3672
		    "%s: could not set TX power, error %d\n", __func__, error);
3674
			return error;
3673
		return error;
3675
		}
3674
	}
3675
3676
3676
	if (!(sc->rxon.filter & htole32(WPI_FILTER_BSS))) {
3677
		/* Add broadcast node. */
3677
		/* Add broadcast node. */
3678
		error = wpi_add_broadcast_node(sc, async);
3678
		error = wpi_add_broadcast_node(sc, async);
3679
		if (error != 0) {
3679
		if (error != 0) {
Lines 3683-3688 Link Here
3683
		}
3683
		}
3684
	}
3684
	}
3685
3685
3686
	/* Configuration has changed, set Tx power accordingly. */
3687
	if ((error = wpi_set_txpower(sc, async)) != 0) {
3688
		device_printf(sc->sc_dev,
3689
		    "%s: could not set TX power, error %d\n", __func__, error);
3690
		return error;
3691
	}
3692
3686
	return 0;
3693
	return 0;
3687
}
3694
}
3688
3695

Return to bug 197143