aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mshajakhan@atheros.com>2011-05-17 03:35:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-19 13:54:04 -0400
commita455c57ed3e4b2166c42286dd7987f36b5e00612 (patch)
tree9bafffd15f5d46d1e8064e91f527e2b3b44f62ed /drivers/net/wireless
parent89ea674565611908e11f92f57b15bf50d82f1f22 (diff)
ath_hw: Fix bssid mask documentation
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/hw.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/hw.c b/drivers/net/wireless/ath/hw.c
index 183c28281385..eda470b24990 100644
--- a/drivers/net/wireless/ath/hw.c
+++ b/drivers/net/wireless/ath/hw.c
@@ -43,7 +43,7 @@
43 * set of ~ ( MAC XOR BSSID ) for all bssids we handle. 43 * set of ~ ( MAC XOR BSSID ) for all bssids we handle.
44 * 44 *
45 * When you do this you are essentially computing the common bits of all your 45 * When you do this you are essentially computing the common bits of all your
46 * BSSes. Later it is assumed the harware will "and" (&) the BSSID mask with 46 * BSSes. Later it is assumed the hardware will "and" (&) the BSSID mask with
47 * the MAC address to obtain the relevant bits and compare the result with 47 * the MAC address to obtain the relevant bits and compare the result with
48 * (frame's BSSID & mask) to see if they match. 48 * (frame's BSSID & mask) to see if they match.
49 * 49 *
@@ -71,8 +71,8 @@
71 * On loop iteration for BSSID-02: 71 * On loop iteration for BSSID-02:
72 * bssid_mask &= ~(0001 ^ 1001) 72 * bssid_mask &= ~(0001 ^ 1001)
73 * bssid_mask = (1010) & ~(0001 ^ 1001) 73 * bssid_mask = (1010) & ~(0001 ^ 1001)
74 * bssid_mask = (1010) & ~(1001) 74 * bssid_mask = (1010) & ~(1000)
75 * bssid_mask = (1010) & (0110) 75 * bssid_mask = (1010) & (0111)
76 * bssid_mask = 0010 76 * bssid_mask = 0010
77 * 77 *
78 * A bssid_mask of 0010 means "only pay attention to the second least 78 * A bssid_mask of 0010 means "only pay attention to the second least
@@ -102,11 +102,9 @@
102 * 102 *
103 * IFRAME-02: 0001 (we should allow) 103 * IFRAME-02: 0001 (we should allow)
104 * 104 *
105 * allow = (0001 & 1010) == 1010
106 *
107 * allow = (IFRAME-02 & bssid_mask) == (bssid_mask & MAC) ? 1 : 0; 105 * allow = (IFRAME-02 & bssid_mask) == (bssid_mask & MAC) ? 1 : 0;
108 * --> allow = (0001 & 0010) == (0010 & 0001) ? 1 :0; 106 * --> allow = (0001 & 0010) == (0010 & 0001) ? 1 :0;
109 * --> allow = (0010) == (0010) 107 * --> allow = (0000) == (0000)
110 * --> allow = 1 108 * --> allow = 1
111 * 109 *
112 * Other examples: 110 * Other examples: