]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: minor correction in sample wowlan mask calculation
authorAmitkumar Karwar <akarwar@marvell.com>
Tue, 12 Feb 2013 07:56:40 +0000 (23:56 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 12 Feb 2013 09:04:13 +0000 (10:04 +0100)
commit18318230a95a115a1b6c20255a8c372b9d4f64cd
treee493d9581351921b98b8c637c92437a986056525
parent2ec76bb41b69f10fc0ae3e385576ceb7c5804f6a
nl80211: minor correction in sample wowlan mask calculation

The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where xx indicates
"don't care") should be represented by a pattern of twelve zero
bytes, and a mask of "0xed,0x01", not "0xed,0x07".

mask_len = (pat_len + 7) / 8 = (12 + 7) / 8 = 2
Hence the mask will be of 2 bytes.
Replace each valid byte in pattern by 1 and don't care byte by 0:
10110111 1000 (0000)

1st byte of pattern corresponds to lower order bit in first byte
of mask. And 9th byte of pattern corresponds to lower order bit
in second byte of mask. With this logic the mask will be
11101101 00000001 = 0xed 0x01

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/uapi/linux/nl80211.h