Lines Matching +full:common +full:- +full:mode

23 #define REG_READ			(common->ops->read)
24 #define REG_WRITE(_ah, _reg, _val) (common->ops->write)(_ah, _val, _reg)
27 * ath_hw_setbssidmask - filter out bssids we listen
29 * @common: the ath_common struct for the device.
33 * to decide which packets to ACK. In station mode and AP mode with a single
34 * BSS every bit matters since we lock to only one BSS. In AP mode with
46 * When you do this you are essentially computing the common bits of all your
52 * BSSID-01 and BSSID-02. Lets assume BSSID-01 will not use the MAC address.
53 * There is another BSSID-03 but you are not part of it. For simplicity's sake,
58 * BSSID-01: 0100 | --> Belongs to us
59 * BSSID-02: 1001 |
61 * -------------------
62 * BSSID-03: 0110 | --> External
63 * -------------------
67 * On loop iteration for BSSID-01:
68 * ~(0001 ^ 0100) -> ~(0101)
69 * -> 1010
72 * On loop iteration for BSSID-02:
80 * significant bit". This is because its the only bit common
82 * common bit is we can simply "&" the bssid_mask now with any BSSID we have
85 * Now, suppose there's an incoming frame for BSSID-03:
87 * IFRAME-01: 0110
89 * An easy eye-inspeciton of this already should tell you that this frame
92 * common bit amongst the MAC and BSSIDs is 0, this frame has the 2nd LSB
95 * So with IFRAME-01 we *assume* the hardware will do:
97 * allow = (IFRAME-01 & bssid_mask) == (bssid_mask & MAC) ? 1 : 0;
98 * --> allow = (0110 & 0010) == (0010 & 0001) ? 1 : 0;
99 * --> allow = (0010) == 0000 ? 1 : 0;
100 * --> allow = 0
104 * IFRAME-02: 0001 (we should allow)
106 * allow = (IFRAME-02 & bssid_mask) == (bssid_mask & MAC) ? 1 : 0;
107 * --> allow = (0001 & 0010) == (0010 & 0001) ? 1 :0;
108 * --> allow = (0000) == (0000)
109 * --> allow = 1
113 * IFRAME-03: 0100 --> allowed
114 * IFRAME-04: 1001 --> allowed
115 * IFRAME-05: 1101 --> allowed but its not for us!!!
118 void ath_hw_setbssidmask(struct ath_common *common) in ath_hw_setbssidmask() argument
120 void *ah = common->ah; in ath_hw_setbssidmask()
123 REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr)); in ath_hw_setbssidmask()
125 id1 |= get_unaligned_le16(common->macaddr + 4); in ath_hw_setbssidmask()
128 REG_WRITE(ah, AR_BSSMSKL, get_unaligned_le32(common->bssidmask)); in ath_hw_setbssidmask()
129 REG_WRITE(ah, AR_BSSMSKU, get_unaligned_le16(common->bssidmask + 4)); in ath_hw_setbssidmask()
135 * ath_hw_cycle_counters_update - common function to update cycle counters
137 * @common: the ath_common struct for the device.
140 * It has to be called while holding common->cc_lock!
142 void ath_hw_cycle_counters_update(struct ath_common *common) in ath_hw_cycle_counters_update() argument
145 void *ah = common->ah; in ath_hw_cycle_counters_update()
166 common->cc_ani.cycles += cycles; in ath_hw_cycle_counters_update()
167 common->cc_ani.rx_busy += busy; in ath_hw_cycle_counters_update()
168 common->cc_ani.rx_frame += rx; in ath_hw_cycle_counters_update()
169 common->cc_ani.tx_frame += tx; in ath_hw_cycle_counters_update()
171 common->cc_survey.cycles += cycles; in ath_hw_cycle_counters_update()
172 common->cc_survey.rx_busy += busy; in ath_hw_cycle_counters_update()
173 common->cc_survey.rx_frame += rx; in ath_hw_cycle_counters_update()
174 common->cc_survey.tx_frame += tx; in ath_hw_cycle_counters_update()
178 int32_t ath_hw_get_listen_time(struct ath_common *common) in ath_hw_get_listen_time() argument
180 struct ath_cycle_counters *cc = &common->cc_ani; in ath_hw_get_listen_time()
183 listen_time = (cc->cycles - cc->rx_frame - cc->tx_frame) / in ath_hw_get_listen_time()
184 (common->clockrate * 1000); in ath_hw_get_listen_time()