if_iwi.c (b626f5a73a48f44a31a200291b141e1da408a2ff) | if_iwi.c (0046e1868fb0f7704f0ba2fd9ec63321adbf0a8e) |
---|---|
1/*- 2 * Copyright (c) 2004, 2005 3 * Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. 4 * Copyright (c) 2005-2006 Sam Leffler, Errno Consulting 5 * Copyright (c) 2007 Andrew Thompson <thompsa@FreeBSD.org> 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 257 unchanged lines hidden (view full) --- 266} 267 268static int 269iwi_attach(device_t dev) 270{ 271 struct iwi_softc *sc = device_get_softc(dev); 272 struct ieee80211com *ic = &sc->sc_ic; 273 uint16_t val; | 1/*- 2 * Copyright (c) 2004, 2005 3 * Damien Bergamini <damien.bergamini@free.fr>. All rights reserved. 4 * Copyright (c) 2005-2006 Sam Leffler, Errno Consulting 5 * Copyright (c) 2007 Andrew Thompson <thompsa@FreeBSD.org> 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 257 unchanged lines hidden (view full) --- 266} 267 268static int 269iwi_attach(device_t dev) 270{ 271 struct iwi_softc *sc = device_get_softc(dev); 272 struct ieee80211com *ic = &sc->sc_ic; 273 uint16_t val; |
274 uint8_t bands[howmany(IEEE80211_MODE_MAX, 8)]; |
|
274 int i, error; | 275 int i, error; |
275 uint8_t bands; | |
276 277 sc->sc_dev = dev; 278 279 IWI_LOCK_INIT(sc); 280 mbufq_init(&sc->sc_snd, ifqmaxlen); 281 282 sc->sc_unr = new_unrhdr(1, IWI_MAX_IBSSNODE-1, &sc->sc_mtx); 283 --- 84 unchanged lines hidden (view full) --- 368 ic->ic_macaddr[0] = val & 0xff; 369 ic->ic_macaddr[1] = val >> 8; 370 val = iwi_read_prom_word(sc, IWI_EEPROM_MAC + 1); 371 ic->ic_macaddr[2] = val & 0xff; 372 ic->ic_macaddr[3] = val >> 8; 373 val = iwi_read_prom_word(sc, IWI_EEPROM_MAC + 2); 374 ic->ic_macaddr[4] = val & 0xff; 375 ic->ic_macaddr[5] = val >> 8; | 276 277 sc->sc_dev = dev; 278 279 IWI_LOCK_INIT(sc); 280 mbufq_init(&sc->sc_snd, ifqmaxlen); 281 282 sc->sc_unr = new_unrhdr(1, IWI_MAX_IBSSNODE-1, &sc->sc_mtx); 283 --- 84 unchanged lines hidden (view full) --- 368 ic->ic_macaddr[0] = val & 0xff; 369 ic->ic_macaddr[1] = val >> 8; 370 val = iwi_read_prom_word(sc, IWI_EEPROM_MAC + 1); 371 ic->ic_macaddr[2] = val & 0xff; 372 ic->ic_macaddr[3] = val >> 8; 373 val = iwi_read_prom_word(sc, IWI_EEPROM_MAC + 2); 374 ic->ic_macaddr[4] = val & 0xff; 375 ic->ic_macaddr[5] = val >> 8; |
376 377 bands = 0; 378 setbit(&bands, IEEE80211_MODE_11B); 379 setbit(&bands, IEEE80211_MODE_11G); | 376 377 memset(bands, 0, sizeof(bands)); 378 setbit(bands, IEEE80211_MODE_11B); 379 setbit(bands, IEEE80211_MODE_11G); |
380 if (pci_get_device(dev) >= 0x4223) | 380 if (pci_get_device(dev) >= 0x4223) |
381 setbit(&bands, IEEE80211_MODE_11A); 382 ieee80211_init_channels(ic, NULL, &bands); | 381 setbit(bands, IEEE80211_MODE_11A); 382 ieee80211_init_channels(ic, NULL, bands); |
383 384 ieee80211_ifattach(ic); 385 /* override default methods */ 386 ic->ic_node_alloc = iwi_node_alloc; 387 sc->sc_node_free = ic->ic_node_free; 388 ic->ic_node_free = iwi_node_free; 389 ic->ic_raw_xmit = iwi_raw_xmit; 390 ic->ic_scan_start = iwi_scan_start; --- 3181 unchanged lines hidden --- | 383 384 ieee80211_ifattach(ic); 385 /* override default methods */ 386 ic->ic_node_alloc = iwi_node_alloc; 387 sc->sc_node_free = ic->ic_node_free; 388 ic->ic_node_free = iwi_node_free; 389 ic->ic_raw_xmit = iwi_raw_xmit; 390 ic->ic_scan_start = iwi_scan_start; --- 3181 unchanged lines hidden --- |