Commit 94262316 authored by Nikitas Angelinas's avatar Nikitas Angelinas Committed by John W. Linville

net/wireless: use ARRAY_SIZE macro in radiotap.c

Replace sizeof(rtap_namespace_sizes) / sizeof(rtap_namespace_sizes[0])
with ARRAY_SIZE(rtap_namespace_sizes) in net/wireless/radiotap.c
Signed-off-by: default avatarNikitas Angelinas <nikitasangelinas@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bbce80e1
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
* See COPYING for more details. * See COPYING for more details.
*/ */
#include <linux/kernel.h>
#include <net/cfg80211.h> #include <net/cfg80211.h>
#include <net/ieee80211_radiotap.h> #include <net/ieee80211_radiotap.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
...@@ -45,7 +46,7 @@ static const struct radiotap_align_size rtap_namespace_sizes[] = { ...@@ -45,7 +46,7 @@ static const struct radiotap_align_size rtap_namespace_sizes[] = {
}; };
static const struct ieee80211_radiotap_namespace radiotap_ns = { static const struct ieee80211_radiotap_namespace radiotap_ns = {
.n_bits = sizeof(rtap_namespace_sizes) / sizeof(rtap_namespace_sizes[0]), .n_bits = ARRAY_SIZE(rtap_namespace_sizes),
.align_size = rtap_namespace_sizes, .align_size = rtap_namespace_sizes,
}; };
......
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