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

Commit 932630fa authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'wireless-drivers-next-for-davem-2019-08-19' of...

Merge tag 'wireless-drivers-next-for-davem-2019-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next



Kalle Valo says:

====================
wireless-drivers-next patches for 5.4

First set of patches for 5.4.

Major changes:

brcmfmac

* enable 160 MHz channel support

rt2x00

* add support for PLANEX GW-USMicroN USB device

rtw88

* add Bluetooth coexistance support
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5483ecef 6004cf29
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -260,8 +260,7 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
#ifdef CONFIG_PM_SLEEP
static int bcma_host_pci_suspend(struct device *dev)
{
	struct pci_dev *pdev = to_pci_dev(dev);
	struct bcma_bus *bus = pci_get_drvdata(pdev);
	struct bcma_bus *bus = dev_get_drvdata(dev);

	bus->mapped_core = NULL;

@@ -270,8 +269,7 @@ static int bcma_host_pci_suspend(struct device *dev)

static int bcma_host_pci_resume(struct device *dev)
{
	struct pci_dev *pdev = to_pci_dev(dev);
	struct bcma_bus *bus = pci_get_drvdata(pdev);
	struct bcma_bus *bus = dev_get_drvdata(dev);

	return bcma_bus_resume(bus);
}
+5 −16
Original line number Diff line number Diff line
@@ -69,17 +69,6 @@ static const s8 b43legacy_tssi2dbm_g_table[] = {

static void b43legacy_phy_initg(struct b43legacy_wldev *dev);


static inline
void b43legacy_voluntary_preempt(void)
{
	B43legacy_BUG_ON(!(!in_atomic() && !in_irq() &&
			  !in_interrupt() && !irqs_disabled()));
#ifndef CONFIG_PREEMPT
	cond_resched();
#endif /* CONFIG_PREEMPT */
}

/* Lock the PHY registers against concurrent access from the microcode.
 * This lock is nonrecursive. */
void b43legacy_phy_lock(struct b43legacy_wldev *dev)
@@ -1124,7 +1113,7 @@ static u16 b43legacy_phy_lo_b_r15_loop(struct b43legacy_wldev *dev)
		ret += b43legacy_phy_read(dev, 0x002C);
	}
	local_irq_restore(flags);
	b43legacy_voluntary_preempt();
	cond_resched();

	return ret;
}
@@ -1253,7 +1242,7 @@ u16 b43legacy_phy_lo_g_deviation_subval(struct b43legacy_wldev *dev,
	}
	ret = b43legacy_phy_read(dev, 0x002D);
	local_irq_restore(flags);
	b43legacy_voluntary_preempt();
	cond_resched();

	return ret;
}
@@ -1591,7 +1580,7 @@ void b43legacy_phy_lo_g_measure(struct b43legacy_wldev *dev)
			b43legacy_radio_write16(dev, 0x43, i);
			b43legacy_radio_write16(dev, 0x52, phy->txctl2);
			udelay(10);
			b43legacy_voluntary_preempt();
			cond_resched();

			b43legacy_phy_set_baseband_attenuation(dev, j * 2);

@@ -1642,7 +1631,7 @@ void b43legacy_phy_lo_g_measure(struct b43legacy_wldev *dev)
					      phy->txctl2
					      | (3/*txctl1*/ << 4));
			udelay(10);
			b43legacy_voluntary_preempt();
			cond_resched();

			b43legacy_phy_set_baseband_attenuation(dev, j * 2);

@@ -1665,7 +1654,7 @@ void b43legacy_phy_lo_g_measure(struct b43legacy_wldev *dev)
		b43legacy_phy_write(dev, 0x0812, (r27 << 8) | 0xA2);
		udelay(2);
		b43legacy_phy_write(dev, 0x0812, (r27 << 8) | 0xA3);
		b43legacy_voluntary_preempt();
		cond_resched();
	} else
		b43legacy_phy_write(dev, 0x0015, r27 | 0xEFA0);
	b43legacy_phy_lo_adjust(dev, is_initializing);
+2 −9
Original line number Diff line number Diff line
@@ -479,18 +479,11 @@ int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr)
	return -ENOMEM;
}

void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr)
{
	struct brcmf_bcdc *bcdc = drvr->proto->pd;

	brcmf_fws_detach_pre_delif(bcdc->fws);
}

void brcmf_proto_bcdc_detach_post_delif(struct brcmf_pub *drvr)
void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr)
{
	struct brcmf_bcdc *bcdc = drvr->proto->pd;

	drvr->proto->pd = NULL;
	brcmf_fws_detach_post_delif(bcdc->fws);
	brcmf_fws_detach(bcdc->fws);
	kfree(bcdc);
}
+2 −4
Original line number Diff line number Diff line
@@ -7,16 +7,14 @@

#ifdef CONFIG_BRCMFMAC_PROTO_BCDC
int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr);
void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr);
void brcmf_proto_bcdc_detach_post_delif(struct brcmf_pub *drvr);
void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr);
void brcmf_proto_bcdc_txflowblock(struct device *dev, bool state);
void brcmf_proto_bcdc_txcomplete(struct device *dev, struct sk_buff *txp,
				 bool success);
struct brcmf_fws_info *drvr_to_fws(struct brcmf_pub *drvr);
#else
static inline int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) { return 0; }
static void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr) {};
static inline void brcmf_proto_bcdc_detach_post_delif(struct brcmf_pub *drvr) {}
static inline void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr) {}
#endif

#endif /* BRCMFMAC_BCDC_H */
+41 −20
Original line number Diff line number Diff line
@@ -189,9 +189,9 @@ static const struct ieee80211_regdomain brcmf_regdom = {
		 */
		REG_RULE(2484-10, 2484+10, 20, 6, 20, 0),
		/* IEEE 802.11a, channel 36..64 */
		REG_RULE(5150-10, 5350+10, 80, 6, 20, 0),
		REG_RULE(5150-10, 5350+10, 160, 6, 20, 0),
		/* IEEE 802.11a, channel 100..165 */
		REG_RULE(5470-10, 5850+10, 80, 6, 20, 0), }
		REG_RULE(5470-10, 5850+10, 160, 6, 20, 0), }
};

/* Note: brcmf_cipher_suites is an array of int defining which cipher suites
@@ -276,8 +276,26 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf,
		else
			ch_inf.sb = BRCMU_CHAN_SB_UU;
		break;
	case NL80211_CHAN_WIDTH_80P80:
	case NL80211_CHAN_WIDTH_160:
		ch_inf.bw = BRCMU_CHAN_BW_160;
		if (primary_offset == -70)
			ch_inf.sb = BRCMU_CHAN_SB_LLL;
		else if (primary_offset == -50)
			ch_inf.sb = BRCMU_CHAN_SB_LLU;
		else if (primary_offset == -30)
			ch_inf.sb = BRCMU_CHAN_SB_LUL;
		else if (primary_offset == -10)
			ch_inf.sb = BRCMU_CHAN_SB_LUU;
		else if (primary_offset == 10)
			ch_inf.sb = BRCMU_CHAN_SB_ULL;
		else if (primary_offset == 30)
			ch_inf.sb = BRCMU_CHAN_SB_ULU;
		else if (primary_offset == 50)
			ch_inf.sb = BRCMU_CHAN_SB_UUL;
		else
			ch_inf.sb = BRCMU_CHAN_SB_UUU;
		break;
	case NL80211_CHAN_WIDTH_80P80:
	case NL80211_CHAN_WIDTH_5:
	case NL80211_CHAN_WIDTH_10:
	default:
@@ -296,6 +314,7 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf,
	}
	d11inf->encchspec(&ch_inf);

	brcmf_dbg(TRACE, "chanspec: 0x%x\n", ch_inf.chspec);
	return ch_inf.chspec;
}

@@ -1267,17 +1286,21 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason)
{
	struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(vif->wdev.wiphy);
	struct brcmf_pub *drvr = cfg->pub;
	bool bus_up = drvr->bus_if->state == BRCMF_BUS_UP;
	s32 err = 0;

	brcmf_dbg(TRACE, "Enter\n");

	if (test_and_clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) {
		if (bus_up) {
			brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n");
			err = brcmf_fil_cmd_data_set(vif->ifp,
						     BRCMF_C_DISASSOC, NULL, 0);
		if (err) {
			bphy_err(drvr, "WLC_DISASSOC failed (%d)\n", err);
			if (err)
				bphy_err(drvr, "WLC_DISASSOC failed (%d)\n",
					 err);
		}

		if ((vif->wdev.iftype == NL80211_IFTYPE_STATION) ||
		    (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT))
			cfg80211_disconnected(vif->wdev.netdev, reason, NULL, 0,
@@ -1287,6 +1310,7 @@ static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason)
	clear_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status);
	brcmf_btcoex_set_mode(vif, BRCMF_BTCOEX_ENABLED, 0);
	if (vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_NONE) {
		if (bus_up)
			brcmf_set_pmk(vif->ifp, NULL, 0);
		vif->profile.use_fwsup = BRCMF_PROFILE_FWSUP_NONE;
	}
@@ -2958,8 +2982,6 @@ static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg,
	struct brcmf_pub *drvr = cfg->pub;
	struct brcmf_bss_info_le *bi;
	const struct brcmf_tlv *tim;
	u16 beacon_interval;
	u8 dtim_period;
	size_t ie_len;
	u8 *ie;
	s32 err = 0;
@@ -2983,12 +3005,9 @@ static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg,

	ie = ((u8 *)bi) + le16_to_cpu(bi->ie_offset);
	ie_len = le32_to_cpu(bi->ie_length);
	beacon_interval = le16_to_cpu(bi->beacon_period);

	tim = brcmf_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
	if (tim)
		dtim_period = tim->data[1];
	else {
	if (!tim) {
		/*
		* active scan was done so we could not get dtim
		* information out of probe response.
@@ -3000,7 +3019,6 @@ static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg,
			bphy_err(drvr, "wl dtim_assoc failed (%d)\n", err);
			goto update_bss_info_out;
		}
		dtim_period = (u8)var;
	}

update_bss_info_out:
@@ -4985,18 +5003,16 @@ static int brcmf_cfg80211_get_channel(struct wiphy *wiphy,
	struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
	struct net_device *ndev = wdev->netdev;
	struct brcmf_pub *drvr = cfg->pub;
	struct brcmf_if *ifp;
	struct brcmu_chan ch;
	enum nl80211_band band = 0;
	enum nl80211_chan_width width = 0;
	u32 chanspec;
	int freq, err;

	if (!ndev)
	if (!ndev || drvr->bus_if->state != BRCMF_BUS_UP)
		return -ENODEV;
	ifp = netdev_priv(ndev);

	err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
	err = brcmf_fil_iovar_int_get(netdev_priv(ndev), "chanspec", &chanspec);
	if (err) {
		bphy_err(drvr, "chanspec failed (%d)\n", err);
		return err;
@@ -6714,6 +6730,11 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp)
		}
	}

	if (wiphy->bands[NL80211_BAND_5GHZ] &&
	    brcmf_feat_is_enabled(ifp, BRCMF_FEAT_DOT11H))
		wiphy_ext_feature_set(wiphy,
				      NL80211_EXT_FEATURE_DFS_OFFLOAD);

	wiphy_read_of_freq_limits(wiphy);

	return 0;
Loading