d80211: Add sparse bitwise annotations
Subsystems (2)
PATCH 1/1 d80211: Add sparse bitwise annotations
This patch adds sparse bitwise annotations to d80211.
Signed-off-by Michael Wu <[email protected]>
---
include/net/d80211.h | 6 +++--- include/net/d80211_mgmt.h | 42 +++++++++++++++++++++--------------------- net/d80211/ieee80211_sta.c | 7 +------ 3 files changed, 25 insertions(+), 30 deletions(-)
include/net/d80211.h +3 -3
@@ -959,12 +959,12 @@ #define IEEE80211_MAX_FRAG_THRESHOLD 234#define IEEE80211_MAX_RTS_THRESHOLD 2347struct ieee80211_hdr { -u16 frame_control; -u16 duration_id; +__le16 frame_control; +__le16 duration_id;u8 addr1[6 ];u8 addr2[6 ];u8 addr3[6 ]; -u16 seq_ctrl; +__le16 seq_ctrl;u8 addr4[6 ]; } __attribute__ ((packed));
include/net/d80211_mgmt.h +21 -21
80 lines not on this page · raw message
net/d80211/ieee80211_sta.c +1 -6
@@ -1344,7 +1344,6 @@ static void ieee80211_rx_bss_info(structstruct sta_info *sta;struct ieee80211_sub_if_data *sdata =IEEE80211_DEV_TO_SUB_IF (dev);u64 timestamp; -u8 *pos;if (!beacon &&memcmp (mgmt->da, dev->dev_addr,ETH_ALEN ))return ;/* ignore ProbeResp to foreign address */
@@ -1359,11 +1358,7 @@ #endifif (baselen > len)return ; - pos = mgmt->u.beacon.timestamp; - timestamp = ((u64 ) pos[7 ] <<56 ) | ((u64 ) pos[6 ] <<48 ) | - ((u64 ) pos[5 ] <<40 ) | ((u64 ) pos[4 ] <<32 ) | - ((u64 ) pos[3 ] <<24 ) | ((u64 ) pos[2 ] <<16 ) | - ((u64 ) pos[1 ] <<8 ) | ((u64 ) pos[0 ]); + timestamp =le64_to_cpu (mgmt->u.beacon.timestamp);if (sdata->type ==IEEE80211_IF_TYPE_IBSS && beacon &&memcmp (mgmt->bssid, sdata->u.sta.bssid,ETH_ALEN ) ==0 ) {