Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: remove unused macros

Various macros in mac80211 aren't used, remove them. In one
case it's used under ifdef, so ifdef it for the W=2 warning.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220202104617.5172d7fd878e.I2f1fce686a2b71003f083b2566fb09cf16b8165a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+7 -13
-6
net/mac80211/airtime.c
··· 68 68 #define IEEE80211_VHT_STREAM_GROUPS 8 /* BW(=4) * SGI(=2) */ 69 69 70 70 #define IEEE80211_HE_MAX_STREAMS 8 71 - #define IEEE80211_HE_STREAM_GROUPS 12 /* BW(=4) * GI(=3) */ 72 71 73 72 #define IEEE80211_HT_GROUPS_NB (IEEE80211_MAX_STREAMS * \ 74 73 IEEE80211_HT_STREAM_GROUPS) 75 74 #define IEEE80211_VHT_GROUPS_NB (IEEE80211_MAX_STREAMS * \ 76 75 IEEE80211_VHT_STREAM_GROUPS) 77 - #define IEEE80211_HE_GROUPS_NB (IEEE80211_HE_MAX_STREAMS * \ 78 - IEEE80211_HE_STREAM_GROUPS) 79 - #define IEEE80211_GROUPS_NB (IEEE80211_HT_GROUPS_NB + \ 80 - IEEE80211_VHT_GROUPS_NB + \ 81 - IEEE80211_HE_GROUPS_NB) 82 76 83 77 #define IEEE80211_HT_GROUP_0 0 84 78 #define IEEE80211_VHT_GROUP_0 (IEEE80211_HT_GROUP_0 + IEEE80211_HT_GROUPS_NB)
+2
net/mac80211/debugfs.c
··· 634 634 .llseek = generic_file_llseek, \ 635 635 }; 636 636 637 + #ifdef CONFIG_MAC80211_DEBUG_COUNTERS 637 638 #define DEBUGFS_STATS_ADD(name) \ 638 639 debugfs_create_u32(#name, 0400, statsd, &local->name); 640 + #endif 639 641 #define DEBUGFS_DEVSTATS_ADD(name) \ 640 642 debugfs_create_file(#name, 0400, statsd, local, &stats_ ##name## _ops); 641 643
+1 -1
net/mac80211/debugfs_key.c
··· 4 4 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 5 5 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 6 6 * Copyright (C) 2015 Intel Deutschland GmbH 7 + * Copyright (C) 2021 Intel Corporation 7 8 */ 8 9 9 10 #include <linux/kobject.h> ··· 23 22 return mac80211_format_buffer(userbuf, count, ppos, \ 24 23 format_string, key->prop); \ 25 24 } 26 - #define KEY_READ_D(name) KEY_READ(name, name, "%d\n") 27 25 #define KEY_READ_X(name) KEY_READ(name, name, "0x%x\n") 28 26 29 27 #define KEY_OPS(name) \
+1 -3
net/mac80211/debugfs_netdev.c
··· 2 2 /* 3 3 * Copyright (c) 2006 Jiri Benc <jbenc@suse.cz> 4 4 * Copyright 2007 Johannes Berg <johannes@sipsolutions.net> 5 - * Copyright (C) 2020 Intel Corporation 5 + * Copyright (C) 2020-2021 Intel Corporation 6 6 */ 7 7 8 8 #include <linux/kernel.h> ··· 77 77 IEEE80211_IF_FMT(name, field, "%#x\n") 78 78 #define IEEE80211_IF_FMT_LHEX(name, field) \ 79 79 IEEE80211_IF_FMT(name, field, "%#lx\n") 80 - #define IEEE80211_IF_FMT_SIZE(name, field) \ 81 - IEEE80211_IF_FMT(name, field, "%zd\n") 82 80 83 81 #define IEEE80211_IF_FMT_HEXARRAY(name, field) \ 84 82 static ssize_t ieee80211_if_fmt_##name( \
+1 -1
net/mac80211/rc80211_minstrel_ht.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0-only 2 2 /* 3 3 * Copyright (C) 2010-2013 Felix Fietkau <nbd@openwrt.org> 4 - * Copyright (C) 2019-2020 Intel Corporation 4 + * Copyright (C) 2019-2021 Intel Corporation 5 5 */ 6 6 #include <linux/netdevice.h> 7 7 #include <linux/types.h>
+2 -2
net/mac80211/status.c
··· 5 5 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 6 6 * Copyright 2008-2010 Johannes Berg <johannes@sipsolutions.net> 7 7 * Copyright 2013-2014 Intel Mobile Communications GmbH 8 + * Copyright 2021 Intel Corporation 8 9 */ 9 10 10 11 #include <linux/export.h> ··· 755 754 */ 756 755 #define STA_LOST_PKT_THRESHOLD 50 757 756 #define STA_LOST_PKT_TIME HZ /* 1 sec since last ACK */ 758 - #define STA_LOST_TDLS_PKT_THRESHOLD 10 759 757 #define STA_LOST_TDLS_PKT_TIME (10*HZ) /* 10secs since last ACK */ 760 758 761 759 static void ieee80211_lost_packet(struct sta_info *sta, ··· 781 781 } 782 782 783 783 /* 784 - * If we're in TDLS mode, make sure that all STA_LOST_TDLS_PKT_THRESHOLD 784 + * If we're in TDLS mode, make sure that all STA_LOST_PKT_THRESHOLD 785 785 * of the last packets were lost, and that no ACK was received in the 786 786 * last STA_LOST_TDLS_PKT_TIME ms, before triggering the CQM packet-loss 787 787 * mechanism.