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

Commit e8975581 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

mac80211: introduce hw config change flags



This makes mac80211 notify the driver which configuration
actually changed, e.g. channel etc.

No driver changes, this is just plumbing, driver authors are
expected to act on this if they want to.

Also remove the HW CONFIG debug printk, it's incorrect, often
we configure something else.

Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0f4ac38b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1314,9 +1314,10 @@ static int adm8211_set_ssid(struct ieee80211_hw *dev, u8 *ssid, size_t ssid_len)
	return 0;
}

static int adm8211_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
static int adm8211_config(struct ieee80211_hw *dev, u32 changed)
{
	struct adm8211_priv *priv = dev->priv;
	struct ieee80211_conf *conf = &dev->conf;
	int channel = ieee80211_frequency_to_channel(conf->channel->center_freq);

	if (channel != priv->channel) {
+3 −4
Original line number Diff line number Diff line
@@ -219,8 +219,7 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
		struct ieee80211_if_init_conf *conf);
static void ath5k_remove_interface(struct ieee80211_hw *hw,
		struct ieee80211_if_init_conf *conf);
static int ath5k_config(struct ieee80211_hw *hw,
		struct ieee80211_conf *conf);
static int ath5k_config(struct ieee80211_hw *hw, u32 changed);
static int ath5k_config_interface(struct ieee80211_hw *hw,
		struct ieee80211_vif *vif,
		struct ieee80211_if_conf *conf);
@@ -2780,10 +2779,10 @@ ath5k_remove_interface(struct ieee80211_hw *hw,
 * TODO: Phy disable/diversity etc
 */
static int
ath5k_config(struct ieee80211_hw *hw,
			struct ieee80211_conf *conf)
ath5k_config(struct ieee80211_hw *hw, u32 changed)
{
	struct ath5k_softc *sc = hw->priv;
	struct ieee80211_conf *conf = &hw->conf;

	sc->bintval = conf->beacon_int;
	sc->power_level = conf->power_level;
+2 −2
Original line number Diff line number Diff line
@@ -1230,11 +1230,11 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
			__func__, error);
}

static int ath9k_config(struct ieee80211_hw *hw,
			struct ieee80211_conf *conf)
static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
{
	struct ath_softc *sc = hw->priv;
	struct ieee80211_channel *curchan = hw->conf.channel;
	struct ieee80211_conf *conf = &hw->conf;
	int pos;

	DPRINTF(sc, ATH_DBG_CONFIG, "%s: Set channel: %d MHz\n",
+2 −1
Original line number Diff line number Diff line
@@ -3320,11 +3320,12 @@ static int b43_switch_band(struct b43_wl *wl, struct ieee80211_channel *chan)
	return err;
}

static int b43_op_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
{
	struct b43_wl *wl = hw_to_b43_wl(hw);
	struct b43_wldev *dev;
	struct b43_phy *phy;
	struct ieee80211_conf *conf = &hw->conf;
	unsigned long flags;
	int antenna;
	int err = 0;
+2 −1
Original line number Diff line number Diff line
@@ -2557,11 +2557,12 @@ static int b43legacy_switch_phymode(struct b43legacy_wl *wl,
}

static int b43legacy_op_dev_config(struct ieee80211_hw *hw,
				   struct ieee80211_conf *conf)
				   u32 changed)
{
	struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
	struct b43legacy_wldev *dev;
	struct b43legacy_phy *phy;
	struct ieee80211_conf *conf = &hw->conf;
	unsigned long flags;
	unsigned int new_phymode = 0xFFFF;
	int antenna_tx;
Loading