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

Commit aa4c7b2a authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville
Browse files

b43: check band width

parent 4bb29f8c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3576,6 +3576,12 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
	dev = wl->current_dev;
	phy = &dev->phy;

	if (conf_is_ht(conf))
		phy->is_40mhz =
			(conf_is_ht40_minus(conf) || conf_is_ht40_plus(conf));
	else
		phy->is_40mhz = false;

	b43_mac_suspend(dev);

	if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS)
+3 −0
Original line number Diff line number Diff line
@@ -212,6 +212,9 @@ struct b43_phy {
	bool supports_2ghz;
	bool supports_5ghz;

	/* HT info */
	bool is_40mhz;

	/* GMODE bit enabled? */
	bool gmode;

+1 −1
Original line number Diff line number Diff line
@@ -1787,7 +1787,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev,

	b43_phy_write(dev, B43_NPHY_IQLOCAL_CMDGCTL, 0x8AA9);

	if (1 /* FIXME: the band width is 20 MHz */)
	if (!dev->phy.is_40mhz)
		freq = 2500;
	else
		freq = 5000;