Commit e5b417e7 authored by Mark Schulte's avatar Mark Schulte Committed by John W. Linville

rtlwifi: sparse warnings: cast to restricted type

Adding type casts to suppress sparse warnings:
 * warning: cast to restricted __le32/__le16
Signed-off-by: default avatarMark Schulte <schultetwin@gmail.com>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5d07cca2
...@@ -688,7 +688,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ...@@ -688,7 +688,7 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
find_p2p_ie = true; find_p2p_ie = true;
/*to find noa ie*/ /*to find noa ie*/
while (ie + 1 < end) { while (ie + 1 < end) {
noa_len = READEF2BYTE(&ie[1]); noa_len = READEF2BYTE((__le16 *)&ie[1]);
if (ie + 3 + ie[1] > end) if (ie + 3 + ie[1] > end)
return; return;
...@@ -717,13 +717,13 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ...@@ -717,13 +717,13 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
READEF1BYTE(ie+index); READEF1BYTE(ie+index);
index += 1; index += 1;
p2pinfo->noa_duration[i] = p2pinfo->noa_duration[i] =
READEF4BYTE(ie+index); READEF4BYTE((__le32 *)ie+index);
index += 4; index += 4;
p2pinfo->noa_interval[i] = p2pinfo->noa_interval[i] =
READEF4BYTE(ie+index); READEF4BYTE((__le32 *)ie+index);
index += 4; index += 4;
p2pinfo->noa_start_time[i] = p2pinfo->noa_start_time[i] =
READEF4BYTE(ie+index); READEF4BYTE((__le32 *)ie+index);
index += 4; index += 4;
} }
...@@ -780,7 +780,7 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, ...@@ -780,7 +780,7 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, "action frame find P2P IE.\n"); RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, "action frame find P2P IE.\n");
/*to find noa ie*/ /*to find noa ie*/
while (ie + 1 < end) { while (ie + 1 < end) {
noa_len = READEF2BYTE(&ie[1]); noa_len = READEF2BYTE((__le16 *)&ie[1]);
if (ie + 3 + ie[1] > end) if (ie + 3 + ie[1] > end)
return; return;
...@@ -809,13 +809,13 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, ...@@ -809,13 +809,13 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
READEF1BYTE(ie+index); READEF1BYTE(ie+index);
index += 1; index += 1;
p2pinfo->noa_duration[i] = p2pinfo->noa_duration[i] =
READEF4BYTE(ie+index); READEF4BYTE((__le32 *)ie+index);
index += 4; index += 4;
p2pinfo->noa_interval[i] = p2pinfo->noa_interval[i] =
READEF4BYTE(ie+index); READEF4BYTE((__le32 *)ie+index);
index += 4; index += 4;
p2pinfo->noa_start_time[i] = p2pinfo->noa_start_time[i] =
READEF4BYTE(ie+index); READEF4BYTE((__le32 *)ie+index);
index += 4; index += 4;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment