Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57fbcce3 authored by Johannes Berg's avatar Johannes Berg
Browse files

cfg80211: remove enum ieee80211_band



This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 35eb8f7b
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -75,7 +75,6 @@
      <chapter>
      <chapter>
      <title>Device registration</title>
      <title>Device registration</title>
!Pinclude/net/cfg80211.h Device registration
!Pinclude/net/cfg80211.h Device registration
!Finclude/net/cfg80211.h ieee80211_band
!Finclude/net/cfg80211.h ieee80211_channel_flags
!Finclude/net/cfg80211.h ieee80211_channel_flags
!Finclude/net/cfg80211.h ieee80211_channel
!Finclude/net/cfg80211.h ieee80211_channel
!Finclude/net/cfg80211.h ieee80211_rate_flags
!Finclude/net/cfg80211.h ieee80211_rate_flags
+2 −2
Original line number Original line Diff line number Diff line
@@ -440,7 +440,7 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
			rx_status.rate_idx = rate;
			rx_status.rate_idx = rate;


			rx_status.freq = adm8211_channels[priv->channel - 1].center_freq;
			rx_status.freq = adm8211_channels[priv->channel - 1].center_freq;
			rx_status.band = IEEE80211_BAND_2GHZ;
			rx_status.band = NL80211_BAND_2GHZ;


			memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
			memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
			ieee80211_rx_irqsafe(dev, skb);
			ieee80211_rx_irqsafe(dev, skb);
@@ -1894,7 +1894,7 @@ static int adm8211_probe(struct pci_dev *pdev,


	priv->channel = 1;
	priv->channel = 1;


	dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
	dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;


	err = ieee80211_register_hw(dev);
	err = ieee80211_register_hw(dev);
	if (err) {
	if (err) {
+2 −2
Original line number Original line Diff line number Diff line
@@ -1471,12 +1471,12 @@ static int ar5523_init_modes(struct ar5523 *ar)
	memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels));
	memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels));
	memcpy(ar->rates, ar5523_rates, sizeof(ar5523_rates));
	memcpy(ar->rates, ar5523_rates, sizeof(ar5523_rates));


	ar->band.band = IEEE80211_BAND_2GHZ;
	ar->band.band = NL80211_BAND_2GHZ;
	ar->band.channels = ar->channels;
	ar->band.channels = ar->channels;
	ar->band.n_channels = ARRAY_SIZE(ar5523_channels);
	ar->band.n_channels = ARRAY_SIZE(ar5523_channels);
	ar->band.bitrates = ar->rates;
	ar->band.bitrates = ar->rates;
	ar->band.n_bitrates = ARRAY_SIZE(ar5523_rates);
	ar->band.n_bitrates = ARRAY_SIZE(ar5523_rates);
	ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &ar->band;
	ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = &ar->band;
	return 0;
	return 0;
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -185,7 +185,7 @@ struct ath_common {
	bool bt_ant_diversity;
	bool bt_ant_diversity;


	int last_rssi;
	int last_rssi;
	struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
	struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
};
};


static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common)
static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common)
+1 −1
Original line number Original line Diff line number Diff line
@@ -765,7 +765,7 @@ struct ath10k {
	} scan;
	} scan;


	struct {
	struct {
		struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
		struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
	} mac;
	} mac;


	/* should never be NULL; needed for regular htt rx */
	/* should never be NULL; needed for regular htt rx */
Loading