diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2015-06-02 15:39:54 -0400 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2015-06-10 10:05:36 -0400 |
| commit | 30686bf7f5b3c30831761e188a6e3cb33580fa48 (patch) | |
| tree | 65be6b3ae5d661bf076af64855555f562fe356fd /drivers/net/wireless/rtlwifi | |
| parent | 206c59d1d7d42bcafc1d7f1e476e87e4427e2345 (diff) | |
mac80211: convert HW flags to unsigned long bitmap
As we're running out of hardware capability flags pretty quickly,
convert them to use the regular test_bit() style unsigned long
bitmaps.
This introduces a number of helper functions/macros to set and to
test the bits, along with new debugfs code.
The occurrences of an explicit __clear_bit() are intentional, the
drivers were never supposed to change their supported bits on the
fly. We should investigate changing this to be a per-frame flag.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
| -rw-r--r-- | drivers/net/wireless/rtlwifi/base.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 01f56c7df8b5..0517a4f2d3f2 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
| @@ -394,20 +394,18 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) | |||
| 394 | } | 394 | } |
| 395 | } | 395 | } |
| 396 | /* <5> set hw caps */ | 396 | /* <5> set hw caps */ |
| 397 | hw->flags = IEEE80211_HW_SIGNAL_DBM | | 397 | ieee80211_hw_set(hw, SIGNAL_DBM); |
| 398 | IEEE80211_HW_RX_INCLUDES_FCS | | 398 | ieee80211_hw_set(hw, RX_INCLUDES_FCS); |
| 399 | IEEE80211_HW_AMPDU_AGGREGATION | | 399 | ieee80211_hw_set(hw, AMPDU_AGGREGATION); |
| 400 | IEEE80211_HW_CONNECTION_MONITOR | | 400 | ieee80211_hw_set(hw, CONNECTION_MONITOR); |
| 401 | /* IEEE80211_HW_SUPPORTS_CQM_RSSI | */ | 401 | ieee80211_hw_set(hw, MFP_CAPABLE); |
| 402 | IEEE80211_HW_MFP_CAPABLE | | 402 | ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS); |
| 403 | IEEE80211_HW_REPORTS_TX_ACK_STATUS | 0; | ||
| 404 | 403 | ||
| 405 | /* swlps or hwlps has been set in diff chip in init_sw_vars */ | 404 | /* swlps or hwlps has been set in diff chip in init_sw_vars */ |
| 406 | if (rtlpriv->psc.swctrl_lps) | 405 | if (rtlpriv->psc.swctrl_lps) { |
| 407 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | | 406 | ieee80211_hw_set(hw, SUPPORTS_PS); |
| 408 | IEEE80211_HW_PS_NULLFUNC_STACK | | 407 | ieee80211_hw_set(hw, PS_NULLFUNC_STACK); |
| 409 | /* IEEE80211_HW_SUPPORTS_DYNAMIC_PS | */ | 408 | } |
| 410 | 0; | ||
| 411 | hw->wiphy->interface_modes = | 409 | hw->wiphy->interface_modes = |
| 412 | BIT(NL80211_IFTYPE_AP) | | 410 | BIT(NL80211_IFTYPE_AP) | |
| 413 | BIT(NL80211_IFTYPE_STATION) | | 411 | BIT(NL80211_IFTYPE_STATION) | |
