History

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

Amitkumar Karwar committed 13 years ago

Commit b6a7bce1 parent 9c35d7d1 file · +1 −1Browse files

Unified · Split

include/uapi/linux/nl80211.h+1−1
@@ -2906,7 +2906,7 @@ enum nl80211_tx_power_setting { · 2905 unmodified lines
2906 * corresponds to the lowest-order bit in the second byte of the mask.2906 * corresponds to the lowest-order bit in the second byte of the mask.
2907 * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where2907 * For example: The match 00:xx:00:00:xx:00:00:00:00:xx:xx:xx (where
2908 * xx indicates "don't care") would be represented by a pattern of2908 * xx indicates "don't care") would be represented by a pattern of
2909 * twelve zero bytes, and a mask of "0xed,0x07".2909 * twelve zero bytes, and a mask of "0xed,0x01".
2910 * Note that the pattern matching is done as though frames were not2910 * Note that the pattern matching is done as though frames were not
2911 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked2911 * 802.11 frames but 802.3 frames, i.e. the frame is fully unpacked
2912 * first (including SNAP header unpacking) and then matched.2912 * first (including SNAP header unpacking) and then matched.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t