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

Collapse All | Expand All

(-)sys/dev/wpi/if_wpi.c (-12 / +20 lines)
Lines 607-613 Link Here
607
607
608
	ieee80211_ratectl_init(vap);
608
	ieee80211_ratectl_init(vap);
609
	/* Complete setup. */
609
	/* Complete setup. */
610
	ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status);
610
	ieee80211_vap_attach(vap, ieee80211_media_change,
611
	    ieee80211_media_status);
611
	ic->ic_opmode = opmode;
612
	ic->ic_opmode = opmode;
612
	return vap;
613
	return vap;
613
}
614
}
Lines 1299-1306 Link Here
1299
	WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_TYPE, &sc->type,
1300
	WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_TYPE, &sc->type,
1300
	    sizeof(sc->type)));
1301
	    sizeof(sc->type)));
1301
1302
1302
	DPRINTF(sc, WPI_DEBUG_EEPROM, "cap=%x rev=%x type=%x\n", sc->cap, le16toh(sc->rev),
1303
	DPRINTF(sc, WPI_DEBUG_EEPROM, "cap=%x rev=%x type=%x\n", sc->cap,
1303
	    sc->type);
1304
	    le16toh(sc->rev), sc->type);
1304
1305
1305
	/* Read the regulatory domain (4 ASCII characters.) */
1306
	/* Read the regulatory domain (4 ASCII characters.) */
1306
	WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_DOMAIN, sc->domain,
1307
	WPI_CHK(wpi_read_prom_data(sc, WPI_EEPROM_DOMAIN, sc->domain,
Lines 1377-1383 Link Here
1377
		c->ic_maxpower = 2*c->ic_maxregpower;
1378
		c->ic_maxpower = 2*c->ic_maxregpower;
1378
1379
1379
		if (n == 0) {	/* 2GHz band */
1380
		if (n == 0) {	/* 2GHz band */
1380
			c->ic_freq = ieee80211_ieee2mhz(chan, IEEE80211_CHAN_G);
1381
			c->ic_freq = ieee80211_ieee2mhz(chan,
1382
			    IEEE80211_CHAN_G);
1383
1381
			/* G =>'s B is supported */
1384
			/* G =>'s B is supported */
1382
			c->ic_flags = IEEE80211_CHAN_B | nflags;
1385
			c->ic_flags = IEEE80211_CHAN_B | nflags;
1383
			c = &ic->ic_channels[ic->ic_nchans++];
1386
			c = &ic->ic_channels[ic->ic_nchans++];
Lines 1384-1390 Link Here
1384
			c[0] = c[-1];
1387
			c[0] = c[-1];
1385
			c->ic_flags = IEEE80211_CHAN_G | nflags;
1388
			c->ic_flags = IEEE80211_CHAN_G | nflags;
1386
		} else {	/* 5GHz band */
1389
		} else {	/* 5GHz band */
1387
			c->ic_freq = ieee80211_ieee2mhz(chan, IEEE80211_CHAN_A);
1390
			c->ic_freq = ieee80211_ieee2mhz(chan,
1391
			    IEEE80211_CHAN_A);
1392
1388
			c->ic_flags = IEEE80211_CHAN_A | nflags;
1393
			c->ic_flags = IEEE80211_CHAN_A | nflags;
1389
		}
1394
		}
1390
1395
Lines 2307-2313 Link Here
2307
		    buf->m, segs, &nsegs, BUS_DMA_NOWAIT);
2312
		    buf->m, segs, &nsegs, BUS_DMA_NOWAIT);
2308
		if (error != 0) {
2313
		if (error != 0) {
2309
			device_printf(sc->sc_dev,
2314
			device_printf(sc->sc_dev,
2310
			    "%s: can't map mbuf (error %d)\n", __func__, error);
2315
			    "%s: can't map mbuf (error %d)\n", __func__,
2316
			    error);
2311
			m_freem(buf->m);
2317
			m_freem(buf->m);
2312
			return error;
2318
			return error;
2313
		}
2319
		}
Lines 2532-2539 Link Here
2532
}
2538
}
2533
2539
2534
static int
2540
static int
2535
wpi_tx_data_raw(struct wpi_softc *sc, struct mbuf *m, struct ieee80211_node *ni,
2541
wpi_tx_data_raw(struct wpi_softc *sc, struct mbuf *m,
2536
    const struct ieee80211_bpf_params *params)
2542
    struct ieee80211_node *ni, const struct ieee80211_bpf_params *params)
2537
{
2543
{
2538
	struct ieee80211vap *vap = ni->ni_vap;
2544
	struct ieee80211vap *vap = ni->ni_vap;
2539
	struct ieee80211_frame *wh;
2545
	struct ieee80211_frame *wh;
Lines 3476-3482 Link Here
3476
		sc->rxon.mode = WPI_MODE_MONITOR;
3482
		sc->rxon.mode = WPI_MODE_MONITOR;
3477
		break;
3483
		break;
3478
	default:
3484
	default:
3479
		device_printf(sc->sc_dev, "unknown opmode %d\n", ic->ic_opmode);
3485
		device_printf(sc->sc_dev, "unknown opmode %d\n",
3486
		    ic->ic_opmode);
3480
		return EINVAL;
3487
		return EINVAL;
3481
	}
3488
	}
3482
	sc->rxon.filter = htole32(sc->rxon.filter);
3489
	sc->rxon.filter = htole32(sc->rxon.filter);
Lines 4332-4339 Link Here
4332
4339
4333
	DPRINTF(sc, WPI_DEBUG_FIRMWARE,
4340
	DPRINTF(sc, WPI_DEBUG_FIRMWARE,
4334
	    "Firmware Version: Major %d, Minor %d, Driver %d, \n"
4341
	    "Firmware Version: Major %d, Minor %d, Driver %d, \n"
4335
	    "runtime (text: %u, data: %u) init (text: %u, data %u) boot (text %u)\n",
4342
	    "runtime (text: %u, data: %u) init (text: %u, data %u) "
4336
	    hdr->major, hdr->minor, le32toh(hdr->driver),
4343
	    "boot (text %u)\n", hdr->major, hdr->minor, le32toh(hdr->driver),
4337
	    fw->main.textsz, fw->main.datasz,
4344
	    fw->main.textsz, fw->main.datasz,
4338
	    fw->init.textsz, fw->init.datasz, fw->boot.textsz);
4345
	    fw->init.textsz, fw->init.datasz, fw->boot.textsz);
4339
4346
Lines 4443-4449 Link Here
4443
			return;
4450
			return;
4444
		DELAY(10);
4451
		DELAY(10);
4445
	}
4452
	}
4446
	device_printf(sc->sc_dev, "%s: timeout waiting for master\n", __func__);
4453
	device_printf(sc->sc_dev, "%s: timeout waiting for master\n",
4454
	    __func__);
4447
}
4455
}
4448
4456
4449
static void
4457
static void

Return to bug 197143