Lines Matching +full:dynamic +full:- +full:power +full:- +full:switching
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
5 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
76 #define IEEE80211_PS_SLEEP 0x1 /* STA is in power saving mode */
93 * says that VHT is supported - and then this macro can be
97 ((ic)->ic_flags_ext & IEEE80211_FEXT_VHT)
100 ((ic)->ic_flags_ext & IEEE80211_FEXT_SEQNO_OFFLOAD)
102 ((ic)->ic_flags_ext & IEEE80211_FEXT_FRAG_OFFLOAD)
106 * 1-1 to a physical device and one or more "Virtual AP's" (VAP)
116 * e.g. device-specific callbacks.
123 uint8_t ie_data[]; /* user-specified IE's */
144 enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */
166 /* driver-supported software crypto caps */
181 uint16_t ic_txpowlimit; /* global tx power limit */
194 * ic_chan_avail that reflects any mode setting or user-specified
197 * be different from ic_bsschan when we are off-channel scanning
202 * lookups when switching back+forth between two channels
203 * (e.g. for dynamic turbo)
235 /* XXX multi-bss: split out common/vap parts */
342 * of A-MPDU tx aggregation is provided; the driver may
344 * A-MPDU rx re-ordering happens automatically if the
345 * driver passes out-of-order frames to ieee80211_input
353 /* check if A-MPDU should be enabled this station+ac */
356 /* start/stop doing A-MPDU tx aggregation for a station */
371 /* start/stop doing A-MPDU rx processing for a station */
378 /* The channel width has changed (20<->2040) */
396 struct sysctl_ctx_list *iv_sysctl; /* dynamic sysctl context */
457 /* sta-mode roaming state */
468 int iv_ampdu_rxmax; /* A-MPDU rx limit (bytes) */
469 int iv_ampdu_density;/* A-MPDU density */
470 int iv_ampdu_limit; /* A-MPDU tx limit (bytes) */
471 int iv_amsdu_limit; /* A-MSDU tx limit (bytes) */
478 uint16_t iv_ps_sta; /* stations in power save */
482 uint8_t *iv_tim_bitmap; /* power-save stations w/ data*/
499 /* application-specified IE's to attach to mgt frames */
538 /* operate-mode detach hook */
564 /* power save handling */
591 uint16_t iv_nonerpsta; /* # non-ERP stations */
595 int iv_lastnonerp; /* last time non-ERP sta noted*/
596 int iv_lastnonht; /* last time non-HT sta noted */
611 /* per-vap U-APSD state */
637 #define IEEE80211_F_PMGTON 0x00000800 /* CONF: Power mgmt enable */
657 #define IEEE80211_F_DWDS 0x80000000 /* CONF: Dynamic WDS enabled */
666 /* Atheros protocol-specific flags */
671 ((vap)->iv_flags & (ni)->ni_ath_flags & (bit))
682 #define IEEE80211_FEXT_4ADDR 0x00000100 /* CONF: apply 4-addr encap */
683 #define IEEE80211_FEXT_NONERP_PR 0x00000200 /* STATUS: non-ERP sta present*/
699 #define IEEE80211_FEXT_UAPSD 0x01000000 /* CONF: enable U-APSD */
709 #define IEEE80211_FHT_NONHT_PR 0x00000001 /* STATUS: non-HT sta present */
714 #define IEEE80211_FHT_AMPDU_TX 0x00100000 /* CONF: A-MPDU tx supported */
715 #define IEEE80211_FHT_AMPDU_RX 0x00200000 /* CONF: A-MPDU rx supported */
716 #define IEEE80211_FHT_AMSDU_TX 0x00400000 /* CONF: A-MSDU tx supported */
717 #define IEEE80211_FHT_AMSDU_RX 0x00800000 /* CONF: A-MSDU rx supported */
836 #define ieee80211_get_current_channel(_ic) ((_ic)->ic_curchan)
837 #define ieee80211_get_home_channel(_ic) ((_ic)->ic_bsschan)
838 #define ieee80211_get_vap_desired_channel(_iv) ((_iv)->iv_des_chan)
866 return (ic->ic_flags_ext & IEEE80211_FEXT_BPF) != 0; in ieee80211_radiotap_active()
872 return (vap->iv_flags_ext & IEEE80211_FEXT_BPF) || in ieee80211_radiotap_active_vap()
873 vap->iv_ic->ic_montaps != 0; in ieee80211_radiotap_active_vap()
882 taskqueue_enqueue(ic->ic_tq, task); in ieee80211_runtask()
891 taskqueue_drain(ic->ic_tq, task); in ieee80211_draintask()
900 vap->iv_key_update_begin(vap); in ieee80211_key_update_begin()
905 vap->iv_key_update_end(vap); in ieee80211_key_update_end()
921 if (ic->ic_flags & IEEE80211_F_DATAPAD) in ieee80211_hdrspace()
933 if (ic->ic_flags & IEEE80211_F_DATAPAD) in ieee80211_anyhdrspace()
944 if (vap->iv_state == IEEE80211_S_RUN) in ieee80211_beacon_notify()
945 vap->iv_update_beacon(vap, what); in ieee80211_beacon_notify()
982 * Fetch the current TX power (cap) for the given node.
984 * This includes the node and ic/vap TX power limit as needed,
985 * but it doesn't take into account any per-rate limit.
990 struct ieee80211com *ic = ni->ni_ic; in ieee80211_get_node_txpower()
993 txpower = ni->ni_txpower; in ieee80211_get_node_txpower()
994 txpower = MIN(txpower, ic->ic_txpowlimit); in ieee80211_get_node_txpower()
995 if (ic->ic_curchan != NULL) { in ieee80211_get_node_txpower()
996 txpower = MIN(txpower, 2 * ic->ic_curchan->ic_maxregpower); in ieee80211_get_node_txpower()
997 txpower = MIN(txpower, ic->ic_curchan->ic_maxpower); in ieee80211_get_node_txpower()
1026 #define IEEE80211_MSG_POWER 0x00040000 /* power save handling */
1038 #define IEEE80211_MSG_ROAM 0x00000040 /* sta-mode roaming */
1050 "\23POWER\24STATE\25OUTPUT\26SCAN\27AUTH\30ASSOC\31NODE\32ELEMID" \
1058 #define ieee80211_msg(_vap, _m) ((_vap)->iv_debug & (_m))
1065 ieee80211_note_mac(_vap, (_ni)->ni_macaddr, _fmt, __VA_ARGS__);\
1081 ((_vap)->iv_debug & IEEE80211_MSG_DEBUG)
1083 ((_vap)->iv_debug & IEEE80211_MSG_DUMPPKTS)
1085 ((_vap)->iv_debug & IEEE80211_MSG_INPUT)
1087 ((_vap)->iv_debug & IEEE80211_MSG_RADIUS)
1089 ((_vap)->iv_debug & IEEE80211_MSG_RADDUMP)
1091 ((_vap)->iv_debug & IEEE80211_MSG_RADKEYS)
1093 ((_vap)->iv_debug & IEEE80211_MSG_SCAN)
1095 ((_vap)->iv_debug & IEEE80211_MSG_ASSOC)
1104 if ((_vap)->iv_debug & (_m)) \
1109 if ((_vap)->iv_debug & (_m)) \
1114 if ((_vap)->iv_debug & (_m)) \