Lines Matching refs:ic
607 struct ieee80211com *ic = &sc->sc_ic;
696 ic->ic_ifp = ifp;
697 ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */
698 ic->ic_opmode = IEEE80211_M_STA; /* default to BSS mode */
699 ic->ic_state = IEEE80211_S_INIT;
702 ic->ic_caps =
711 ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b;
712 ic->ic_sup_rates[IEEE80211_MODE_11G] = ieee80211_std_rateset_11g;
716 ic->ic_channels[i].ic_freq =
718 ic->ic_channels[i].ic_flags =
738 ieee80211_ifattach(ic);
741 sc->sc_newstate = ic->ic_newstate;
742 ic->ic_newstate = urtw_newstate;
746 ieee80211_media_init_with_lock(ic,
761 aprint_normal(", address %s\n", ether_sprintf(ic->ic_myaddr));
763 ieee80211_announce(ic);
1045 urtw_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int arg)
1047 struct urtw_softc *sc = ic->ic_ifp->if_softc;
1394 struct ieee80211com *ic = &sc->sc_ic;
1401 ic->ic_myaddr[0] = data & 0xff;
1402 ic->ic_myaddr[1] = (data & 0xff00) >> 8;
1406 ic->ic_myaddr[2] = data & 0xff;
1407 ic->ic_myaddr[3] = (data & 0xff00) >> 8;
1411 ic->ic_myaddr[4] = data & 0xff;
1412 ic->ic_myaddr[5] = (data & 0xff00) >> 8;
2039 struct ieee80211com *ic = &sc->sc_ic;
2051 switch (ic->ic_opmode) {
2058 ic->ic_opmode);
2135 struct ieee80211com *ic = &sc->sc_ic;
2147 if (ic->ic_opmode == IEEE80211_M_MONITOR) {
2151 if (sc->sc_crcmon == 1 && ic->ic_opmode == IEEE80211_M_MONITOR)
2154 if (ic->ic_opmode == IEEE80211_M_MONITOR ||
2254 struct ieee80211com *ic = &sc->sc_ic;
2277 IEEE80211_ADDR_COPY(ic->ic_myaddr, CLLADDR(ifp->if_sadl));
2278 error = urtw_set_macaddr(sc, ic->ic_myaddr);
2356 if (ic->ic_opmode == IEEE80211_M_MONITOR)
2357 ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
2359 ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
2373 struct ieee80211com *ic = &sc->sc_ic;
2406 error = ieee80211_ioctl(ic, cmd, data);
2412 (ic->ic_roaming != IEEE80211_ROAMING_MANUAL))
2427 struct ieee80211com *ic = &sc->sc_ic;
2440 IF_POLL(&ic->ic_mgtq, m0);
2448 IF_DEQUEUE(&ic->ic_mgtq, m0);
2451 bpf_mtap3(ic->ic_rawbpf, m0, BPF_D_OUT);
2456 if (ic->ic_state != IEEE80211_S_RUN)
2472 ni = ieee80211_find_txnode(ic, eh->ether_dhost);
2478 m0 = ieee80211_encap(ic, m0, ni);
2483 bpf_mtap3(ic->ic_rawbpf, m0, BPF_D_OUT);
2521 struct ieee80211com *ic = &sc->sc_ic;
2522 struct ifnet *ifp = ic->ic_ifp;
2560 struct ieee80211com *ic = &sc->sc_ic;
2561 struct ifnet *ifp = ic->ic_ifp;
2597 struct ieee80211com *ic = &sc->sc_ic;
2607 k = ieee80211_crypto_encap(ic, ni, m0);
2621 tap->wt_chan_freq = htole16(ic->ic_bss->ni_chan->ic_freq);
2622 tap->wt_chan_flags = htole16(ic->ic_bss->ni_chan->ic_flags);
2645 if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
2649 if ((m0->m_pkthdr.len > ic->ic_rtsthreshold) &&
2665 else if (ic->ic_fixed_rate != -1)
2666 data->buf[3] = urtw_rate2rtl(ic->ic_fixed_rate);
2952 struct ieee80211com *ic = &sc->sc_ic;
2953 struct ieee80211_channel *c = ic->ic_ibss_chan;
2965 ic->ic_flags & IEEE80211_F_SHSLOT)
3013 struct ieee80211com *ic = &sc->sc_ic;
3017 ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
3057 struct ieee80211com *ic = &sc->sc_ic;
3058 struct ifnet *ifp = ic->ic_ifp;
3143 tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq);
3144 tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
3152 ni = ieee80211_find_rxnode(ic, (struct ieee80211_frame_min *)wh);
3166 ieee80211_input(ic, m, ni, rssi, 0);
3368 struct ieee80211com *ic = &sc->sc_ic;
3369 struct ieee80211_channel *c = ic->ic_ibss_chan;
3382 ic->ic_flags & IEEE80211_F_SHSLOT)
3405 struct ieee80211com *ic = &sc->sc_ic;
3410 chan = ieee80211_chan2ieee(ic, c);
3437 struct ieee80211com *ic = &sc->sc_ic;
3444 if (ic->ic_state == IEEE80211_S_SCAN)
3445 ieee80211_next_scan(ic);
3453 struct ieee80211com *ic = &sc->sc_ic;
3461 ostate = ic->ic_state;
3472 urtw_set_chan(sc, ic->ic_curchan);
3479 urtw_set_chan(sc, ic->ic_curchan);
3483 ni = ic->ic_bss;
3485 urtw_set_chan(sc, ic->ic_curchan);
3504 sc->sc_newstate(ic, sc->sc_state, sc->sc_arg);
3516 struct ieee80211com *ic = &sc->sc_ic;
3517 struct ieee80211_channel *c = ic->ic_ibss_chan;
3595 struct ieee80211com *ic = &sc->sc_ic;
3612 IEEE80211_ADDR_COPY(ic->ic_myaddr, CLLADDR(ifp->if_sadl));
3613 error = urtw_set_macaddr(sc, ic->ic_myaddr);
3720 if (ic->ic_opmode == IEEE80211_M_MONITOR)
3721 ieee80211_new_state(ic, IEEE80211_S_RUN, -1);
3723 ieee80211_new_state(ic, IEEE80211_S_SCAN, -1);
3770 struct ieee80211com *ic = &sc->sc_ic;
3771 struct ieee80211_channel *c = ic->ic_ibss_chan;