radiotap: Silence sparse warnings about byte order swapping
These little endian fields were not marked properly and the type case in the get_unaligned_* helper macros were causing warnings from sparse. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
94c4d78ef1
commit
fad6485c56
5 changed files with 7 additions and 7 deletions
|
@ -136,7 +136,7 @@ static void handle_monitor_read(int sock, void *eloop_ctx, void *sock_ctx)
|
|||
break;
|
||||
case IEEE80211_RADIOTAP_TX_FLAGS:
|
||||
injected = 1;
|
||||
failed = le_to_host16((*(uint16_t *) iter.this_arg)) &
|
||||
failed = le_to_host16((*(le16 *) iter.this_arg)) &
|
||||
IEEE80211_RADIOTAP_F_TX_FAIL;
|
||||
break;
|
||||
case IEEE80211_RADIOTAP_DATA_RETRIES:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
\
|
||||
__ptr->__val; \
|
||||
})
|
||||
#define get_unaligned_le16(p) le16_to_cpu(get_unaligned((uint16_t *)(p)))
|
||||
#define get_unaligned_le32(p) le32_to_cpu(get_unaligned((uint32_t *)(p)))
|
||||
#define get_unaligned_le16(p) le16_to_cpu(get_unaligned((le16 *)(p)))
|
||||
#define get_unaligned_le32(p) le32_to_cpu(get_unaligned((le32 *)(p)))
|
||||
|
||||
#endif /* PLATFORM_H */
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
*
|
||||
* See COPYING for more details.
|
||||
*/
|
||||
#include "radiotap_iter.h"
|
||||
#include "platform.h"
|
||||
#include "radiotap_iter.h"
|
||||
|
||||
/* function prototypes and related defs are in radiotap_iter.h */
|
||||
|
||||
|
|
|
@ -65,12 +65,12 @@ struct ieee80211_radiotap_header {
|
|||
* new fields does not count.
|
||||
*/
|
||||
uint8_t it_pad;
|
||||
uint16_t it_len; /* length of the whole
|
||||
le16 it_len; /* length of the whole
|
||||
* header in bytes, including
|
||||
* it_version, it_pad,
|
||||
* it_len, and data fields.
|
||||
*/
|
||||
uint32_t it_present; /* A bitmap telling which
|
||||
le32 it_present; /* A bitmap telling which
|
||||
* fields are present. Set bit 31
|
||||
* (0x80000000) to extend the
|
||||
* bitmap by another 32 bits.
|
||||
|
|
|
@ -67,7 +67,7 @@ struct ieee80211_radiotap_iterator {
|
|||
const struct ieee80211_radiotap_namespace *current_namespace;
|
||||
|
||||
unsigned char *_arg, *_next_ns_data;
|
||||
uint32_t *_next_bitmap;
|
||||
le32 *_next_bitmap;
|
||||
|
||||
unsigned char *this_arg;
|
||||
#ifdef RADIOTAP_SUPPORT_OVERRIDES
|
||||
|
|
Loading…
Reference in a new issue