Commit 7fee5372 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Cc: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7a7dec65
...@@ -967,7 +967,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) ...@@ -967,7 +967,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf)
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band; hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band;
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
IEEE80211_HW_SIGNAL_DB; IEEE80211_HW_SIGNAL_UNSPEC;
hw->wiphy->interface_modes = hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_MESH_POINT) | BIT(NL80211_IFTYPE_MESH_POINT) |
......
...@@ -860,11 +860,6 @@ enum ieee80211_tkip_key_type { ...@@ -860,11 +860,6 @@ enum ieee80211_tkip_key_type {
* expect values between 0 and @max_signal. * expect values between 0 and @max_signal.
* If possible please provide dB or dBm instead. * If possible please provide dB or dBm instead.
* *
* @IEEE80211_HW_SIGNAL_DB:
* Hardware gives signal values in dB, decibel difference from an
* arbitrary, fixed reference. We expect values between 0 and @max_signal.
* If possible please provide dBm instead.
*
* @IEEE80211_HW_SIGNAL_DBM: * @IEEE80211_HW_SIGNAL_DBM:
* Hardware gives signal values in dBm, decibel difference from * Hardware gives signal values in dBm, decibel difference from
* one milliwatt. This is the preferred method since it is standardized * one milliwatt. This is the preferred method since it is standardized
...@@ -900,15 +895,14 @@ enum ieee80211_hw_flags { ...@@ -900,15 +895,14 @@ enum ieee80211_hw_flags {
IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4, IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4,
IEEE80211_HW_SIGNAL_UNSPEC = 1<<5, IEEE80211_HW_SIGNAL_UNSPEC = 1<<5,
IEEE80211_HW_SIGNAL_DB = 1<<6, IEEE80211_HW_SIGNAL_DBM = 1<<6,
IEEE80211_HW_SIGNAL_DBM = 1<<7, IEEE80211_HW_NOISE_DBM = 1<<7,
IEEE80211_HW_NOISE_DBM = 1<<8, IEEE80211_HW_SPECTRUM_MGMT = 1<<8,
IEEE80211_HW_SPECTRUM_MGMT = 1<<9, IEEE80211_HW_AMPDU_AGGREGATION = 1<<9,
IEEE80211_HW_AMPDU_AGGREGATION = 1<<10, IEEE80211_HW_SUPPORTS_PS = 1<<10,
IEEE80211_HW_SUPPORTS_PS = 1<<11, IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11,
IEEE80211_HW_PS_NULLFUNC_STACK = 1<<12, IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<13, IEEE80211_HW_MFP_CAPABLE = 1<<13,
IEEE80211_HW_MFP_CAPABLE = 1<<14,
}; };
/** /**
......
...@@ -884,7 +884,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) ...@@ -884,7 +884,6 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
local->hw.conf.listen_interval = local->hw.max_listen_interval; local->hw.conf.listen_interval = local->hw.max_listen_interval;
local->wstats_flags |= local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC | local->wstats_flags |= local->hw.flags & (IEEE80211_HW_SIGNAL_UNSPEC |
IEEE80211_HW_SIGNAL_DB |
IEEE80211_HW_SIGNAL_DBM) ? IEEE80211_HW_SIGNAL_DBM) ?
IW_QUAL_QUAL_UPDATED : IW_QUAL_QUAL_INVALID; IW_QUAL_QUAL_UPDATED : IW_QUAL_QUAL_INVALID;
local->wstats_flags |= local->hw.flags & IEEE80211_HW_NOISE_DBM ? local->wstats_flags |= local->hw.flags & IEEE80211_HW_NOISE_DBM ?
......
...@@ -86,8 +86,7 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local, ...@@ -86,8 +86,7 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local,
if (status->flag & RX_FLAG_TSFT) if (status->flag & RX_FLAG_TSFT)
len += 8; len += 8;
if (local->hw.flags & IEEE80211_HW_SIGNAL_DB || if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
len += 1; len += 1;
if (local->hw.flags & IEEE80211_HW_NOISE_DBM) if (local->hw.flags & IEEE80211_HW_NOISE_DBM)
len += 1; len += 1;
...@@ -199,14 +198,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, ...@@ -199,14 +198,6 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
*pos = status->antenna; *pos = status->antenna;
pos++; pos++;
/* IEEE80211_RADIOTAP_DB_ANTSIGNAL */
if (local->hw.flags & IEEE80211_HW_SIGNAL_DB) {
*pos = status->signal;
rthdr->it_present |=
cpu_to_le32(1 << IEEE80211_RADIOTAP_DB_ANTSIGNAL);
pos++;
}
/* IEEE80211_RADIOTAP_DB_ANTNOISE is not used */ /* IEEE80211_RADIOTAP_DB_ANTNOISE is not used */
/* IEEE80211_RADIOTAP_RX_FLAGS */ /* IEEE80211_RADIOTAP_RX_FLAGS */
......
...@@ -173,8 +173,7 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev, ...@@ -173,8 +173,7 @@ static int ieee80211_ioctl_giwrange(struct net_device *dev,
range->num_encoding_sizes = 2; range->num_encoding_sizes = 2;
range->max_encoding_tokens = NUM_DEFAULT_KEYS; range->max_encoding_tokens = NUM_DEFAULT_KEYS;
if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC || if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)
local->hw.flags & IEEE80211_HW_SIGNAL_DB)
range->max_qual.level = local->hw.max_signal; range->max_qual.level = local->hw.max_signal;
else if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) else if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
range->max_qual.level = -110; range->max_qual.level = -110;
......
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