aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-12-31 17:41:47 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-31 17:41:47 (GMT)
commit5ace51a48aa6931edec3232df5191230977ef239 (patch)
tree7889fca6ba8432ad8e6de27bb967450e87901a05 /src
parentc5838683a8b46ad22602400453f807bd611144d1 (diff)
downloadhostap-5ace51a48aa6931edec3232df5191230977ef239.zip
hostap-5ace51a48aa6931edec3232df5191230977ef239.tar.gz
hostap-5ace51a48aa6931edec3232df5191230977ef239.tar.bz2
WNM: Clean up le16 variable use to avoid sparse warnings
intval is marked le16 and should be used through proper byte order conversion functions even if it ended up getting set correctly due to the two operations cancelling each other. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src')
-rw-r--r--src/ap/wnm_ap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ap/wnm_ap.c b/src/ap/wnm_ap.c
index 8255204..8e5bdcb 100644
--- a/src/ap/wnm_ap.c
+++ b/src/ap/wnm_ap.c
@@ -73,7 +73,7 @@ static int ieee802_11_send_wnmsleep_resp(struct hostapd_data *hapd,
wnmsleep_ie.len = wnmsleep_ie_len - 2;
wnmsleep_ie.action_type = action_type;
wnmsleep_ie.status = WNM_STATUS_SLEEP_ACCEPT;
- wnmsleep_ie.intval = intval;
+ wnmsleep_ie.intval = host_to_le16(intval);
/* TFS IE(s) */
wnmtfs_ie = os_zalloc(MAX_TFS_IE_LEN);
@@ -236,7 +236,7 @@ static void ieee802_11_rx_wnmsleep_req(struct hostapd_data *hapd,
ieee802_11_send_wnmsleep_resp(hapd, addr, dialog_token,
wnmsleep_ie->action_type,
- wnmsleep_ie->intval);
+ le_to_host16(wnmsleep_ie->intval));
if (wnmsleep_ie->action_type == WNM_SLEEP_MODE_EXIT) {
/* clear the tfs after sending the resp frame */