Lines Matching refs:ic

300 	struct ieee80211com *ic = &sc->sc_ic;
385 rum_get_rf(sc->rf_rev), ether_sprintf(ic->ic_myaddr));
387 ic->ic_ifp = ifp;
388 ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */
389 ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */
390 ic->ic_state = IEEE80211_S_INIT;
393 ic->ic_caps =
404 ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a;
408 ic->ic_channels[i].ic_freq =
410 ic->ic_channels[i].ic_flags = IEEE80211_CHAN_A;
413 ic->ic_channels[i].ic_freq =
415 ic->ic_channels[i].ic_flags = IEEE80211_CHAN_A;
418 ic->ic_channels[i].ic_freq =
420 ic->ic_channels[i].ic_flags = IEEE80211_CHAN_A;
423 ic->ic_channels[i].ic_freq =
425 ic->ic_channels[i].ic_flags = IEEE80211_CHAN_A;
430 ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
431 ic->ic_sup_rates[IEEE80211_MODE_11G] = ieee80211_std_rateset_11g;
435 ic->ic_channels[i].ic_freq =
437 ic->ic_channels[i].ic_flags =
453 ieee80211_ifattach(ic);
454 ic->ic_newassoc = rum_newassoc;
457 sc->sc_newstate = ic->ic_newstate;
458 ic->ic_newstate = rum_newstate;
462 ieee80211_media_init_with_lock(ic,
477 ieee80211_announce(ic);
491 struct ieee80211com *ic = &sc->sc_ic;
508 ieee80211_ifdetach(ic); /* free all nodes */
658 struct ieee80211com *ic = &sc->sc_ic;
662 if (ic->ic_state == IEEE80211_S_SCAN)
663 ieee80211_next_scan(ic);
671 struct ieee80211com *ic = &sc->sc_ic;
676 ostate = ic->ic_state;
688 rum_set_chan(sc, ic->ic_curchan);
693 rum_set_chan(sc, ic->ic_curchan);
697 rum_set_chan(sc, ic->ic_curchan);
701 rum_set_chan(sc, ic->ic_curchan);
703 ni = ic->ic_bss;
705 if (ic->ic_opmode != IEEE80211_M_MONITOR) {
713 if (ic->ic_opmode == IEEE80211_M_HOSTAP ||
714 ic->ic_opmode == IEEE80211_M_IBSS)
717 if (ic->ic_opmode != IEEE80211_M_MONITOR)
720 if (ic->ic_opmode == IEEE80211_M_STA) {
722 rum_newassoc(ic->ic_bss, 1);
725 if (ic->ic_fixed_rate == IEEE80211_FIXED_RATE_NONE)
732 sc->sc_newstate(ic, sc->sc_state, sc->sc_arg);
736 rum_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
738 struct rum_softc *sc = ic->ic_ifp->if_softc;
807 struct ieee80211com *ic = &sc->sc_ic;
879 tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq);
880 tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags);
888 ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
891 ieee80211_input(ic, m, ni, desc->rssi, 0);
943 rum_ack_rate(struct ieee80211com *ic, int rate)
952 return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate;
1026 struct ieee80211com *ic = &sc->sc_ic;
1063 if (rate != 2 && (ic->ic_flags & IEEE80211_F_SHPREAMBLE))
1073 struct ieee80211com *ic = &sc->sc_ic;
1086 k = ieee80211_crypto_encap(ic, ni, m0);
1105 } else if (ic->ic_fixed_rate != IEEE80211_FIXED_RATE_NONE) {
1106 rate = ic->ic_bss->ni_rates.rs_rates[ic->ic_fixed_rate];
1116 if (pktlen > ic->ic_rtsthreshold) {
1118 } else if ((ic->ic_flags & IEEE80211_F_USEPROT) &&
1120 if (ic->ic_protmode == IEEE80211_PROT_CTSONLY)
1122 else if (ic->ic_protmode == IEEE80211_PROT_RTSCTS)
1131 ackrate = rum_ack_rate(ic, rate);
1133 dur = rum_txtime(pktlen, rate, ic->ic_flags) +
1134 rum_txtime(RUM_ACK_SIZE, ackrate, ic->ic_flags) +
1137 dur += rum_txtime(RUM_CTS_SIZE, rum_ack_rate(ic,
1138 protrate), ic->ic_flags) + sc->sifs;
1139 mprot = ieee80211_get_rts(ic, wh, dur);
1141 mprot = ieee80211_get_cts_to_self(ic, dur);
1194 dur = rum_txtime(RUM_ACK_SIZE, rum_ack_rate(ic, rate),
1195 ic->ic_flags) + sc->sifs;
1210 tap->wt_chan_freq = htole16(ic->ic_curchan->ic_freq);
1211 tap->wt_chan_flags = htole16(ic->ic_curchan->ic_flags);
1253 struct ieee80211com *ic = &sc->sc_ic;
1262 IF_POLL(&ic->ic_mgtq, m0);
1268 IF_DEQUEUE(&ic->ic_mgtq, m0);
1272 bpf_mtap3(ic->ic_rawbpf, m0, BPF_D_OUT);
1277 if (ic->ic_state != IEEE80211_S_RUN)
1292 ni = ieee80211_find_txnode(ic, eh->ether_dhost);
1298 m0 = ieee80211_encap(ic, m0, ni);
1303 bpf_mtap3(ic->ic_rawbpf, m0, BPF_D_OUT);
1320 struct ieee80211com *ic = &sc->sc_ic;
1334 ieee80211_watchdog(ic);
1344 struct ieee80211com *ic = &sc->sc_ic;
1376 error = ieee80211_ioctl(ic, cmd, data);
1381 (ic->ic_roaming != IEEE80211_ROAMING_MANUAL))
1575 struct ieee80211com *ic = &sc->sc_ic;
1581 if (!IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan))
1605 struct ieee80211com *ic = &sc->sc_ic;
1608 if (ic->ic_curmode == IEEE80211_MODE_11B) {
1611 } else if (ic->ic_curmode == IEEE80211_MODE_11A) {
1673 struct ieee80211com *ic = &sc->sc_ic;
1679 chan = ieee80211_chan2ieee(ic, c);
1703 if (c->ic_flags != ic->ic_curchan->ic_flags) {
1707 ic->ic_curchan = c;
1746 struct ieee80211com *ic = &sc->sc_ic;
1749 if (ic->ic_opmode != IEEE80211_M_STA) {
1760 tmp |= ic->ic_bss->ni_intval * 16;
1763 if (ic->ic_opmode == IEEE80211_M_STA)
1774 struct ieee80211com *ic = &sc->sc_ic;
1778 slottime = (ic->ic_flags & IEEE80211_F_SHSLOT) ? 9 : 20;
1844 struct ieee80211com *ic = &sc->sc_ic;
1855 rum_eeprom_read(sc, RT2573_EEPROM_ADDRESS, ic->ic_myaddr, 6);
1953 struct ieee80211com *ic = &sc->sc_ic;
1990 rum_select_band(sc, ic->ic_curchan);
1992 rum_set_chan(sc, ic->ic_curchan);
1997 IEEE80211_ADDR_COPY(ic->ic_myaddr, CLLADDR(ifp->if_sadl));
1998 rum_set_macaddr(sc, ic->ic_myaddr);
2074 if (ic->ic_opmode != IEEE80211_M_MONITOR) {
2077 if (ic->ic_opmode != IEEE80211_M_HOSTAP)
2087 if (ic->ic_opmode == IEEE80211_M_MONITOR)
2088 ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
2090 ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
2102 struct ieee80211com *ic = &sc->sc_ic;
2105 ieee80211_new_state(ic, IEEE80211_S_INIT, -1); /* free all nodes */
2174 struct ieee80211com *ic = &sc->sc_ic;
2179 m0 = ieee80211_beacon_alloc(ic, ic->ic_bss, &sc->sc_bo);
2187 rate = IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan) ? 12 : 2;