Deleted Added
full compact
if_wpi.c (173585) if_wpi.c (173976)
1/*-
2 * Copyright (c) 2006,2007
3 * Damien Bergamini <damien.bergamini@free.fr>
4 * Benjamin Close <Benjamin.Close@clearchain.com>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.

--- 5 unchanged lines hidden (view full) ---

14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#define VERSION "20071102"
20
21#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006,2007
3 * Damien Bergamini <damien.bergamini@free.fr>
4 * Benjamin Close <Benjamin.Close@clearchain.com>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.

--- 5 unchanged lines hidden (view full) ---

14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#define VERSION "20071102"
20
21#include <sys/cdefs.h>
22__FBSDID("$FreeBSD: head/sys/dev/wpi/if_wpi.c 173585 2007-11-13 16:12:59Z rink $");
22__FBSDID("$FreeBSD: head/sys/dev/wpi/if_wpi.c 173976 2007-11-27 08:58:32Z benjsc $");
23
24/*
25 * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
26 *
27 * The 3945ABG network adapter doesn't use traditional hardware as
28 * many other adaptors do. Instead at run time the eeprom is set into a known
29 * state and told to load boot firmware. The boot firmware loads an init and a
30 * main binary firmware image into SRAM on the card via DMA.

--- 1764 unchanged lines hidden (view full) ---

1795 desc->idx,
1796 desc->flags,
1797 desc->type,
1798 le32toh(desc->len)));
1799
1800 if (!(desc->qid & 0x80)) /* reply to a command */
1801 wpi_cmd_intr(sc, desc);
1802
23
24/*
25 * Driver for Intel PRO/Wireless 3945ABG 802.11 network adapters.
26 *
27 * The 3945ABG network adapter doesn't use traditional hardware as
28 * many other adaptors do. Instead at run time the eeprom is set into a known
29 * state and told to load boot firmware. The boot firmware loads an init and a
30 * main binary firmware image into SRAM on the card via DMA.

--- 1764 unchanged lines hidden (view full) ---

1795 desc->idx,
1796 desc->flags,
1797 desc->type,
1798 le32toh(desc->len)));
1799
1800 if (!(desc->qid & 0x80)) /* reply to a command */
1801 wpi_cmd_intr(sc, desc);
1802
1803 /* XXX beacon miss handling? */
1804 switch (desc->type) {
1805 case WPI_RX_DONE:
1806 /* a 802.11 frame was received */
1807 wpi_rx_intr(sc, desc, data);
1808 break;
1809
1810 case WPI_TX_DONE:
1811 /* a 802.11 frame has been transmitted */

--- 53 unchanged lines hidden (view full) ---

1865
1866 DPRINTFN(WPI_DEBUG_SCANNING,
1867 ("scan finished nchan=%d status=%d chan=%d\n",
1868 scan->nchan, scan->status, scan->chan));
1869
1870 wpi_queue_cmd(sc, WPI_SCAN_NEXT);
1871 break;
1872 }
1803 switch (desc->type) {
1804 case WPI_RX_DONE:
1805 /* a 802.11 frame was received */
1806 wpi_rx_intr(sc, desc, data);
1807 break;
1808
1809 case WPI_TX_DONE:
1810 /* a 802.11 frame has been transmitted */

--- 53 unchanged lines hidden (view full) ---

1864
1865 DPRINTFN(WPI_DEBUG_SCANNING,
1866 ("scan finished nchan=%d status=%d chan=%d\n",
1867 scan->nchan, scan->status, scan->chan));
1868
1869 wpi_queue_cmd(sc, WPI_SCAN_NEXT);
1870 break;
1871 }
1872 case WPI_MISSED_BEACON:
1873 {
1874 struct wpi_missed_beacon *beacon =
1875 (struct wpi_missed_beacon *)(desc + 1);
1876
1877 if (le32toh(beacon->consecutive) >= ic->ic_bmissthreshold) {
1878 DPRINTF(("Beacon miss: %u >= %u\n",
1879 le32toh(beacon->consecutive),
1880 ic->ic_bmissthreshold));
1881 ieee80211_beacon_miss(ic);
1882 }
1873 }
1883 }
1884 }
1874
1875 sc->rxq.cur = (sc->rxq.cur + 1) % WPI_RX_RING_COUNT;
1876 }
1877
1878 /* tell the firmware what we have processed */
1879 hw = (hw == 0) ? WPI_RX_RING_COUNT - 1 : hw - 1;
1880 WPI_WRITE(sc, WPI_RX_WIDX, hw & ~7);
1881

--- 2021 unchanged lines hidden ---
1885
1886 sc->rxq.cur = (sc->rxq.cur + 1) % WPI_RX_RING_COUNT;
1887 }
1888
1889 /* tell the firmware what we have processed */
1890 hw = (hw == 0) ? WPI_RX_RING_COUNT - 1 : hw - 1;
1891 WPI_WRITE(sc, WPI_RX_WIDX, hw & ~7);
1892

--- 2021 unchanged lines hidden ---