aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-01-30 05:13:06 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-09 15:03:44 -0500
commit7fee5372d814c4be9546e5c28ac0058258d8df3e (patch)
tree021aefd5c32d265f2ca6c9b379c11e0484aeba74
parent7a7dec656252a5784218a22abf76ad1cdef115d0 (diff)
mac80211: remove HW_SIGNAL_DB
Giving the signal in dB isn't much more useful to userspace than giving the signal in unspecified units. This removes some radiotap information for zd1211 (the only driver using this flag), but it helps a lot for getting cfg80211-based scanning which won't support dB, and zd1211 being dB is a little fishy anyway. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Bruno Randolf <bruno@thinktube.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c2
-rw-r--r--include/net/mac80211.h22
-rw-r--r--net/mac80211/main.c1
-rw-r--r--net/mac80211/rx.c11
-rw-r--r--net/mac80211/wext.c3
5 files changed, 11 insertions, 28 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index a611ad857983..651807dfb508 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -967,7 +967,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf)
967 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band; 967 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band;
968 968
969 hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | 969 hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
970 IEEE80211_HW_SIGNAL_DB; 970 IEEE80211_HW_SIGNAL_UNSPEC;
971 971
972 hw->wiphy->interface_modes = 972 hw->wiphy->interface_modes =
973 BIT(NL80211_IFTYPE_MESH_POINT) | 973 BIT(NL80211_IFTYPE_MESH_POINT) |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e2144f0e8728..409e2c69269d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -860,11 +860,6 @@ enum ieee80211_tkip_key_type {
860 * expect values between 0 and @max_signal. 860 * expect values between 0 and @max_signal.
861 * If possible please provide dB or dBm instead. 861 * If possible please provide dB or dBm instead.
862 * 862 *
863 * @IEEE80211_HW_SIGNAL_DB:
864 * Hardware gives signal values in dB, decibel difference from an
865 * arbitrary, fixed reference. We expect values between 0 and @max_signal.
866 * If possible please provide dBm instead.
867 *
868 * @IEEE80211_HW_SIGNAL_DBM: 863 * @IEEE80211_HW_SIGNAL_DBM:
869 * Hardware gives signal values in dBm, decibel difference from 864 * Hardware gives signal values in dBm, decibel difference from
870 * one milliwatt. This is the preferred method since it is standardized 865 * one milliwatt. This is the preferred method since it is standardized
@@ -900,15 +895,14 @@ enum ieee80211_hw_flags {
900 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, 895 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
901 IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4, 896 IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4,
902 IEEE80211_HW_SIGNAL_UNSPEC = 1<<5, 897 IEEE80211_HW_SIGNAL_UNSPEC = 1<<5,
903 IEEE80211_HW_SIGNAL_DB = 1<<6, 898 IEEE80211_HW_SIGNAL_DBM = 1<<6,
904 IEEE80211_HW_SIGNAL_DBM = 1<<7, 899 IEEE80211_HW_NOISE_DBM = 1<<7,
905 IEEE80211_HW_NOISE_DBM = 1<<8, 900 IEEE80211_HW_SPECTRUM_MGMT = 1<<8,
906 IEEE80211_HW_SPECTRUM_MGMT = 1<<9, 901 IEEE80211_HW_AMPDU_AGGREGATION = 1<<9,
907 IEEE80211_HW_AMPDU_AGGREGATION = 1<<10, 902 IEEE80211_HW_SUPPORTS_PS = 1<<10,
908 IEEE80211_HW_SUPPORTS_PS = 1<<11, 903 IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11,
909 IEEE80211_HW_PS_NULLFUNC_STACK = 1<<12, 904 IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
910 IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<13, 905 IEEE80211_HW_MFP_CAPABLE = 1<<13,
911 IEEE80211_HW_MFP_CAPABLE = 1<<14,
912}; 906};
913 907
914/** 908/**
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index a109c06e8e4e..7247b303e966 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -884,7 +884,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
884 local->hw.conf.listen_interval = local->hw.max_listen_interval; 884 local->hw.conf.listen_interval = local->hw.max_listen_interval;
885 885
886 local->wstats_flags |= local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC | 886 local->wstats_flags |= local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC |
887 IEEE80211_HW_SIGNAL_DB |
888 IEEE80211_HW_SIGNAL_DBM) ? 887 IEEE80211_HW_SIGNAL_DBM) ?
889 IW_QUAL_QUAL_UPDATED : IW_QUAL_QUAL_INVALID; 888 IW_QUAL_QUAL_UPDATED : IW_QUAL_QUAL_INVALID;
890 local->wstats_flags |= local->hw.flags & IEEE80211_HW_NOISE_DBM ? 889 local->wstats_flags |= local->hw.flags & IEEE80211_HW_NOISE_DBM ?
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 1a59382976e6..8e8ddbfcd236 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -86,8 +86,7 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local,
86 86
87 if (status->flag & RX_FLAG_TSFT) 87 if (status->flag & RX_FLAG_TSFT)
88 len += 8; 88 len += 8;
89 if (local->hw.flags & IEEE80211_HW_SIGNAL_DB || 89 if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
90 local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
91 len += 1; 90 len += 1;
92 if (local->hw.flags & IEEE80211_HW_NOISE_DBM) 91 if (local->hw.flags & IEEE80211_HW_NOISE_DBM)
93 len += 1; 92 len += 1;
@@ -199,14 +198,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
199 *pos = status->antenna; 198 *pos = status->antenna;
200 pos++; 199 pos++;
201 200
202 /* IEEE80211_RADIOTAP_DB_ANTSIGNAL */
203 if (local->hw.flags & IEEE80211_HW_SIGNAL_DB) {
204 *pos = status->signal;
205 rthdr->it_present |=
206 cpu_to_le32(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL);
207 pos++;
208 }
209
210 /* IEEE80211_RADIOTAP_DB_ANTNOISE is not used */ 201 /* IEEE80211_RADIOTAP_DB_ANTNOISE is not used */
211 202
212 /* IEEE80211_RADIOTAP_RX_FLAGS */ 203 /* IEEE80211_RADIOTAP_RX_FLAGS */
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 5c88b8246bbb..bad1cfbfdf18 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -173,8 +173,7 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev,
173 range->num_encoding_sizes = 2; 173 range->num_encoding_sizes = 2;
174 range->max_encoding_tokens = NUM_DEFAULT_KEYS; 174 range->max_encoding_tokens = NUM_DEFAULT_KEYS;
175 175
176 if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC || 176 if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)
177 local->hw.flags & IEEE80211_HW_SIGNAL_DB)
178 range->max_qual.level = local->hw.max_signal; 177 range->max_qual.level = local->hw.max_signal;
179 else if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) 178 else if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
180 range->max_qual.level = -110; 179 range->max_qual.level = -110;