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

Collapse All | Expand All

(-)sys/dev/wpi/if_wpi.c (-24 / +6 lines)
Lines 2564-2570 Link Here
2564
	struct ieee80211_channel *c;
2569
	struct ieee80211_channel *c;
2565
	enum ieee80211_phymode mode;
2570
	enum ieee80211_phymode mode;
2566
	uint8_t *frm;
2571
	uint8_t *frm;
2567
	int nrates, pktlen, error, i, nssid;
2572
	int pktlen, error, i, nssid;
2568
	bus_addr_t physaddr;
2573
	bus_addr_t physaddr;
2569
2574
2570
	desc = &ring->desc[ring->cur];
2575
	desc = &ring->desc[ring->cur];
Lines 2613-2619 Link Here
2613
	nssid = MIN(ss->ss_nssid, WPI_SCAN_MAX_ESSIDS);
2618
	nssid = MIN(ss->ss_nssid, WPI_SCAN_MAX_ESSIDS);
2614
	for (i = 0; i < nssid; i++) {
2619
	for (i = 0; i < nssid; i++) {
2615
		hdr->scan_essids[i].id = IEEE80211_ELEMID_SSID;
2620
		hdr->scan_essids[i].id = IEEE80211_ELEMID_SSID;
2616
		hdr->scan_essids[i].esslen = MIN(ss->ss_ssid[i].len, 32);
2621
		hdr->scan_essids[i].esslen = MIN(ss->ss_ssid[i].len, IEEE80211_NWID_LEN);
2617
		memcpy(hdr->scan_essids[i].essid, ss->ss_ssid[i].ssid,
2622
		memcpy(hdr->scan_essids[i].essid, ss->ss_ssid[i].ssid,
2618
		    hdr->scan_essids[i].esslen);
2623
		    hdr->scan_essids[i].esslen);
2619
#ifdef WPI_DEBUG
2624
#ifdef WPI_DEBUG
Lines 2630-2636 Link Here
2630
	 * Build a probe request frame.  Most of the following code is a
2635
	 * Build a probe request frame.  Most of the following code is a
2631
	 * copy & paste of what is done in net80211.
2636
	 * copy & paste of what is done in net80211.
2632
	 */
2637
	 */
2633
	wh = (struct ieee80211_frame *)&hdr->scan_essids[4];
2638
	wh = (struct ieee80211_frame *)&hdr->scan_essids[WPI_SCAN_MAX_ESSIDS];
2634
	wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_MGT |
2639
	wh->i_fc[0] = IEEE80211_FC0_VERSION_0 | IEEE80211_FC0_TYPE_MGT |
2635
		IEEE80211_FC0_SUBTYPE_PROBE_REQ;
2640
		IEEE80211_FC0_SUBTYPE_PROBE_REQ;
2636
	wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
2641
	wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
Lines 2642-2672 Link Here
2642
2647
2643
	frm = (uint8_t *)(wh + 1);
2648
	frm = (uint8_t *)(wh + 1);
2644
2649
2645
	/* add essid IE, the hardware will fill this in for us */
2646
	*frm++ = IEEE80211_ELEMID_SSID;
2647
	*frm++ = 0;
2648
2649
	mode = ieee80211_chan2mode(ic->ic_curchan);
2650
	mode = ieee80211_chan2mode(ic->ic_curchan);
2650
	rs = &ic->ic_sup_rates[mode];
2651
	rs = &ic->ic_sup_rates[mode];
2651
2652
2652
	/* add supported rates IE */
2653
	frm = ieee80211_add_ssid(frm, NULL, 0);
2653
	*frm++ = IEEE80211_ELEMID_RATES;
2654
	frm = ieee80211_add_rates(frm, rs);
2654
	nrates = rs->rs_nrates;
2655
	frm = ieee80211_add_xrates(frm, rs);
2655
	if (nrates > IEEE80211_RATE_SIZE)
2656
		nrates = IEEE80211_RATE_SIZE;
2657
	*frm++ = nrates;
2658
	memcpy(frm, rs->rs_rates, nrates);
2659
	frm += nrates;
2660
2656
2661
	/* add supported xrates IE */
2662
	if (rs->rs_nrates > IEEE80211_RATE_SIZE) {
2663
		nrates = rs->rs_nrates - IEEE80211_RATE_SIZE;
2664
		*frm++ = IEEE80211_ELEMID_XRATES;
2665
		*frm++ = nrates;
2666
		memcpy(frm, rs->rs_rates + IEEE80211_RATE_SIZE, nrates);
2667
		frm += nrates;
2668
	}
2669
2670
	/* setup length of probe request */
2657
	/* setup length of probe request */
2671
	hdr->tx.len = htole16(frm - (uint8_t *)wh);
2658
	hdr->tx.len = htole16(frm - (uint8_t *)wh);
2672
2659
(-)sys/dev/wpi/if_wpireg.h (-1 / +1 lines)
Lines 511-517 Link Here
511
	struct {
511
	struct {
512
	    uint8_t		id;
512
	    uint8_t		id;
513
	    uint8_t		esslen;
513
	    uint8_t		esslen;
514
	    uint8_t		essid[32];
514
	    uint8_t		essid[IEEE80211_NWID_LEN];
515
	}scan_essids[WPI_SCAN_MAX_ESSIDS];
515
	}scan_essids[WPI_SCAN_MAX_ESSIDS];
516
	/* followed by probe request body */
516
	/* followed by probe request body */
517
	/* followed by nchan x wpi_scan_chan */
517
	/* followed by nchan x wpi_scan_chan */

Return to bug 196069