Lines Matching +full:mac +full:- +full:only

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
32 * which bits of the interface's MAC address should be looked at when trying
34 * BSS every bit matters since we lock to only one BSS. In AP mode with
36 * accept frames for all BSSes and so we tweak some bits of our mac address
44 * set of ~ ( MAC XOR BSSID ) for all bssids we handle.
48 * the MAC address to obtain the relevant bits and compare the result with
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,
54 * assuming only 4 bits for a mac address and for BSSIDs you can then have:
57 * MAC: 0001 |
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:
79 * A bssid_mask of 0010 means "only pay attention to the second least
80 * significant bit". This is because its the only bit common
81 * amongst the MAC and all BSSIDs we support. To findout what the real
83 * or our MAC address (we assume the hardware uses the MAC address).
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
91 * hardware to only look at the second least significant bit and the
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!!!
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
140 * It has to be called while holding common->cc_lock!
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()
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()