Lines Matching refs:ic

413 	struct ieee80211com *ic = &sc->sc_ic;  in ural_txeof()  local
432 mac_tx_update(ic->ic_mach); in ural_txeof()
444 struct ieee80211com *ic = &sc->sc_ic; in ural_rxeof() local
515 ni = ieee80211_find_rxnode(ic, wh); in ural_rxeof()
518 (void) ieee80211_input(ic, m, ni, desc->rssi, 0); in ural_rxeof()
539 ural_ack_rate(struct ieee80211com *ic, int rate) in ural_ack_rate() argument
548 return ((ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate); in ural_ack_rate()
622 struct ieee80211com *ic = &sc->sc_ic; in ural_setup_tx_desc() local
654 if (rate != 2 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE)) in ural_setup_tx_desc()
665 ural_send(ieee80211com_t *ic, mblk_t *mp, uint8_t type) in ural_send() argument
667 struct ural_softc *sc = (struct ural_softc *)ic; in ural_send()
720 ni = ieee80211_find_txnode(ic, wh->i_addr1); in ural_send()
730 (void) ieee80211_encap(ic, m, ni); in ural_send()
734 k = ieee80211_crypto_encap(ic, m); in ural_send()
750 if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) in ural_send()
751 rate = ic->ic_bss->in_rates.ir_rates[ic->ic_fixed_rate]; in ural_send()
764 dur = ural_txtime(RAL_ACK_SIZE, ural_ack_rate(ic, rate), in ural_send()
765 ic->ic_flags) + RAL_SIFS; in ural_send()
769 rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2; in ural_send()
774 dur = ural_txtime(RAL_ACK_SIZE, rate, ic->ic_flags) in ural_send()
807 ic->ic_stats.is_tx_frags++; in ural_send()
808 ic->ic_stats.is_tx_bytes += pktlen; in ural_send()
828 struct ieee80211com *ic = &sc->sc_ic; in ural_m_tx() local
836 if (ic->ic_state != IEEE80211_S_RUN) { in ural_m_tx()
838 "discard, state %u\n", ic->ic_state); in ural_m_tx()
846 if (ural_send(ic, mp, IEEE80211_FC0_TYPE_DATA) != DDI_SUCCESS) { in ural_m_tx()
1007 struct ieee80211com *ic = &sc->sc_ic; in ural_set_chan() local
1011 chan = ieee80211_chan2ieee(ic, c); in ural_set_chan()
1021 power -= (100 - ic->ic_txpowlimit) / 8; in ural_set_chan()
1089 if (ic->ic_opmode != IEEE80211_M_MONITOR && in ural_set_chan()
1090 ic->ic_state != IEEE80211_S_SCAN) { in ural_set_chan()
1115 struct ieee80211com *ic = &sc->sc_ic; in ural_enable_tsf_sync() local
1121 tmp = (16 * ic->ic_bss->in_intval) << 4; in ural_enable_tsf_sync()
1124 logcwmin = (ic->ic_opmode == IEEE80211_M_IBSS) ? 2 : 0; in ural_enable_tsf_sync()
1125 preload = (ic->ic_opmode == IEEE80211_M_IBSS) ? 320 : 6; in ural_enable_tsf_sync()
1131 if (ic->ic_opmode == IEEE80211_M_STA) in ural_enable_tsf_sync()
1146 ural_update_slot(struct ieee80211com *ic, int onoff) in ural_update_slot() argument
1148 struct ural_softc *sc = (struct ural_softc *)ic; in ural_update_slot()
1151 slottime = (ic->ic_flags & IEEE80211_F_SHSLOT) ? 9 : 20; in ural_update_slot()
1158 if (ic->ic_curmode == IEEE80211_MODE_11B) { in ural_update_slot()
1188 struct ieee80211com *ic = &sc->sc_ic; in ural_set_basicrates() local
1191 if (ic->ic_curmode == IEEE80211_MODE_11B) { in ural_set_basicrates()
1194 } else if (IEEE80211_IS_CHAN_5GHZ(ic->ic_bss->in_chan)) { in ural_set_basicrates()
1273 struct ieee80211com *ic = &sc->sc_ic; in ural_read_eeprom() local
1286 ural_eeprom_read(sc, RAL_EEPROM_ADDRESS, ic->ic_macaddr, 6); in ural_read_eeprom()
1375 struct ieee80211com *ic = &sc->sc_ic; in ural_next_scan() local
1377 if (ic->ic_state == IEEE80211_S_SCAN) in ural_next_scan()
1378 ieee80211_next_scan(ic); in ural_next_scan()
1382 ural_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg) in ural_newstate() argument
1384 struct ural_softc *sc = (struct ural_softc *)ic; in ural_newstate()
1391 ostate = ic->ic_state; in ural_newstate()
1414 ural_set_chan(sc, ic->ic_curchan); in ural_newstate()
1420 ural_set_chan(sc, ic->ic_curchan); in ural_newstate()
1424 ural_set_chan(sc, ic->ic_curchan); in ural_newstate()
1428 ural_set_chan(sc, ic->ic_curchan); in ural_newstate()
1430 ni = ic->ic_bss; in ural_newstate()
1432 if (ic->ic_opmode != IEEE80211_M_MONITOR) { in ural_newstate()
1433 ural_update_slot(ic, 1); in ural_newstate()
1443 if (ic->ic_opmode != IEEE80211_M_MONITOR) in ural_newstate()
1447 if (ic->ic_opmode == IEEE80211_M_STA && in ural_newstate()
1448 ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) in ural_newstate()
1456 err = sc->sc_newstate(ic, nstate, arg); in ural_newstate()
1461 ieee80211_start_watchdog(ic, 1); in ural_newstate()
1644 struct ieee80211com *ic = &sc->sc_ic; in ural_stop() local
1646 ieee80211_new_state(ic, IEEE80211_S_INIT, -1); in ural_stop()
1647 ieee80211_stop_watchdog(ic); /* stop the watchdog */ in ural_stop()
1669 struct ieee80211com *ic = &sc->sc_ic; in ural_init() local
1706 ural_set_chan(sc, ic->ic_curchan); in ural_init()
1714 ural_set_macaddr(sc, ic->ic_macaddr); in ural_init()
1729 if (ic->ic_opmode != IEEE80211_M_MONITOR) { in ural_init()
1731 if (ic->ic_opmode != IEEE80211_M_HOSTAP) in ural_init()
1749 struct ieee80211com *ic; in ural_disconnect() local
1761 ic = &sc->sc_ic; in ural_disconnect()
1762 ieee80211_new_state(ic, IEEE80211_S_INIT, -1); in ural_disconnect()
1763 ieee80211_stop_watchdog(ic); /* stop the watchdog */ in ural_disconnect()
1942 struct ieee80211com *ic = &sc->sc_ic; in ural_watchdog() local
1946 ic->ic_watchdog_timer = 0; in ural_watchdog()
1958 (void) ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); in ural_watchdog()
1963 if (ic->ic_state == IEEE80211_S_RUN) in ural_watchdog()
1968 ieee80211_watchdog(ic); in ural_watchdog()
1971 ieee80211_start_watchdog(ic, ntimer); in ural_watchdog()
2009 struct ieee80211com *ic = &sc->sc_ic; in ural_m_unicst() local
2014 IEEE80211_ADDR_COPY(ic->ic_macaddr, macaddr); in ural_m_unicst()
2053 struct ieee80211com *ic = &sc->sc_ic; in ural_m_setprop() local
2056 err = ieee80211_setprop(ic, pr_name, wldp_pr_num, in ural_m_setprop()
2063 (void) ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); in ural_m_setprop()
2099 struct ieee80211com *ic = &sc->sc_ic; in ural_m_ioctl() local
2102 err = ieee80211_ioctl(ic, wq, mp); in ural_m_ioctl()
2108 (void) ieee80211_new_state(ic, IEEE80211_S_SCAN, -1); in ural_m_ioctl()
2119 ieee80211com_t *ic = &sc->sc_ic; in ural_m_stat() local
2120 ieee80211_node_t *ni = ic->ic_bss; in ural_m_stat()
2126 *val = ((ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE) ? in ural_m_stat()
2128 : ic->ic_fixed_rate) / 2 * 1000000; in ural_m_stat()
2140 *val = ic->ic_stats.is_rx_bytes; in ural_m_stat()
2143 *val = ic->ic_stats.is_rx_frags; in ural_m_stat()
2146 *val = ic->ic_stats.is_tx_bytes; in ural_m_stat()
2149 *val = ic->ic_stats.is_tx_frags; in ural_m_stat()
2169 return (ieee80211_stat(ic, stat, val)); in ural_m_stat()
2184 struct ieee80211com *ic; in ural_attach() local
2215 ic = (ieee80211com_t *)&sc->sc_ic; in ural_attach()
2243 ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ in ural_attach()
2244 ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */ in ural_attach()
2245 ic->ic_state = IEEE80211_S_INIT; in ural_attach()
2247 ic->ic_maxrssi = 63; in ural_attach()
2248 ic->ic_set_shortslot = ural_update_slot; in ural_attach()
2249 ic->ic_xmit = ural_send; in ural_attach()
2252 ic->ic_caps = in ural_attach()
2257 ic->ic_caps |= IEEE80211_C_WPA; /* Support WPA/WPA2 */ in ural_attach()
2264 ic->ic_sup_rates[IEEE80211_MODE_11A] = ural_rateset_11a; in ural_attach()
2268 ic->ic_sup_channels[i].ich_freq = in ural_attach()
2270 ic->ic_sup_channels[i].ich_flags = IEEE80211_CHAN_A; in ural_attach()
2273 ic->ic_sup_channels[i].ich_freq = in ural_attach()
2275 ic->ic_sup_channels[i].ich_flags = IEEE80211_CHAN_A; in ural_attach()
2278 ic->ic_sup_channels[i].ich_freq = in ural_attach()
2280 ic->ic_sup_channels[i].ich_flags = IEEE80211_CHAN_A; in ural_attach()
2285 ic->ic_sup_rates[IEEE80211_MODE_11B] = ural_rateset_11b; in ural_attach()
2286 ic->ic_sup_rates[IEEE80211_MODE_11G] = ural_rateset_11g; in ural_attach()
2290 ic->ic_sup_channels[i].ich_freq = in ural_attach()
2292 ic->ic_sup_channels[i].ich_flags = in ural_attach()
2297 ieee80211_attach(ic); in ural_attach()
2300 ieee80211_register_door(ic, ddi_driver_name(devinfo), in ural_attach()
2304 sc->sc_newstate = ic->ic_newstate; in ural_attach()
2305 ic->ic_newstate = ural_newstate; in ural_attach()
2306 ic->ic_watchdog = ural_watchdog; in ural_attach()
2307 ieee80211_media_init(ic); in ural_attach()
2308 ic->ic_def_txkey = 0; in ural_attach()
2318 wd.wd_opmode = ic->ic_opmode; in ural_attach()
2320 IEEE80211_ADDR_COPY(wd.wd_bssid, ic->ic_bss->in_bssid); in ural_attach()
2331 macp->m_src_addr = ic->ic_macaddr; in ural_attach()
2338 err = mac_register(macp, &ic->ic_mach); in ural_attach()
2367 mac_link_update(ic->ic_mach, LINK_STATE_DOWN); in ural_attach()
2371 (void) mac_unregister(ic->ic_mach); in ural_attach()