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

Commit 56b87180 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'wireless-drivers-next-for-davem-2016-01-05' of...

Merge tag 'wireless-drivers-next-for-davem-2016-01-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next



Kalle Valo says:

====================
brcfmac

* fix IBSS which got broken over time
* new USB id for bcm43242 dongle
* arp offload configuration through inet notifier

ath9k

* add random number generator support (CONFIG_ATH9K_HWRNG)

iwlwifi

* Make scan parameters low latency aware
* Fix in the NL80211_FEATURE_FULL_AP_CLIENT_STATE state case
* Fix enable injection mode (Chaya Rachel)
* Various cleanups (Dan / Julia / myself)
* Allow to stay more time on popular channels (David Spinadel)
* Bug fixes for D0i3 (Eliad / Luca)
* Fixes for GO uAPSD (myself)
* Start of TSO support (myself)
* Rate control bug fixes (Eyal / Gregory)
* Start the work on 9000 devices (Johannes / Sara / Oren)
* Start the work on a new Tx queue allocation model (Liad)
* Debug infrastructure enhancements (Golan)

mwifiex

* add a debugfs file for chip reset
* advertise SMS4 cipher suite
* increase ap and station interface limit to 3
* enable MSI support on newer pcie devices (8897 onwards)

rtlwifi

* fix lots of module parameter usage
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents be78a690 49f2a47d
Loading
Loading
Loading
Loading
+1 −38
Original line number Diff line number Diff line
@@ -101,50 +101,13 @@ static void bcm47xx_machine_halt(void)
}

#ifdef CONFIG_BCM47XX_SSB
static int bcm47xx_get_invariants(struct ssb_bus *bus,
				  struct ssb_init_invariants *iv)
{
	char buf[20];
	int len, err;

	/* Fill boardinfo structure */
	memset(&iv->boardinfo, 0 , sizeof(struct ssb_boardinfo));

	len = bcm47xx_nvram_getenv("boardvendor", buf, sizeof(buf));
	if (len > 0) {
		err = kstrtou16(strim(buf), 0, &iv->boardinfo.vendor);
		if (err)
			pr_warn("Couldn't parse nvram board vendor entry with value \"%s\"\n",
				buf);
	}
	if (!iv->boardinfo.vendor)
		iv->boardinfo.vendor = SSB_BOARDVENDOR_BCM;

	len = bcm47xx_nvram_getenv("boardtype", buf, sizeof(buf));
	if (len > 0) {
		err = kstrtou16(strim(buf), 0, &iv->boardinfo.type);
		if (err)
			pr_warn("Couldn't parse nvram board type entry with value \"%s\"\n",
				buf);
	}

	memset(&iv->sprom, 0, sizeof(struct ssb_sprom));
	bcm47xx_fill_sprom(&iv->sprom, NULL, false);

	if (bcm47xx_nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
		iv->has_cardbus_slot = !!simple_strtoul(buf, NULL, 10);

	return 0;
}

static void __init bcm47xx_register_ssb(void)
{
	int err;
	char buf[100];
	struct ssb_mipscore *mcore;

	err = ssb_bus_ssbbus_register(&bcm47xx_bus.ssb, SSB_ENUM_BASE,
				      bcm47xx_get_invariants);
	err = ssb_bus_host_soc_register(&bcm47xx_bus.ssb, SSB_ENUM_BASE);
	if (err)
		panic("Failed to initialize SSB bus (err %d)", err);

+27 −2
Original line number Diff line number Diff line
@@ -668,11 +668,36 @@ static int bcma_device_uevent(struct device *dev, struct kobj_uevent_env *env)
			      core->id.rev, core->id.class);
}

static int __init bcma_modinit(void)
static unsigned int bcma_bus_registered;

/*
 * If built-in, bus has to be registered early, before any driver calls
 * bcma_driver_register.
 * Otherwise registering driver would trigger BUG in driver_register.
 */
static int __init bcma_init_bus_register(void)
{
	int err;

	if (bcma_bus_registered)
		return 0;

	err = bus_register(&bcma_bus_type);
	if (!err)
		bcma_bus_registered = 1;

	return err;
}
#ifndef MODULE
fs_initcall(bcma_init_bus_register);
#endif

/* Main initialization has to be done with SPI/mtd/NAND/SPROM available */
static int __init bcma_modinit(void)
{
	int err;

	err = bcma_init_bus_register();
	if (err)
		return err;

@@ -691,7 +716,7 @@ static int __init bcma_modinit(void)

	return err;
}
fs_initcall(bcma_modinit);
module_init(bcma_modinit);

static void __exit bcma_modexit(void)
{
+1 −1
Original line number Diff line number Diff line
@@ -1139,7 +1139,7 @@ static ssize_t ath10k_read_htt_max_amsdu_ampdu(struct file *file,
{
	struct ath10k *ar = file->private_data;
	char buf[64];
	u8 amsdu = 3, ampdu = 64;
	u8 amsdu, ampdu;
	unsigned int len;

	mutex_lock(&ar->conf_mutex);
+2 −1
Original line number Diff line number Diff line
@@ -250,7 +250,8 @@ static int ath10k_install_peer_wep_keys(struct ath10k_vif *arvif,
	lockdep_assert_held(&ar->conf_mutex);

	if (WARN_ON(arvif->vif->type != NL80211_IFTYPE_AP &&
		    arvif->vif->type != NL80211_IFTYPE_ADHOC))
		    arvif->vif->type != NL80211_IFTYPE_ADHOC &&
		    arvif->vif->type != NL80211_IFTYPE_MESH_POINT))
		return -EINVAL;

	spin_lock_bh(&ar->data_lock);
+43 −18
Original line number Diff line number Diff line
@@ -4312,34 +4312,58 @@ void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb)
	ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_RESUME_REQ_EVENTID\n");
}

static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
static int ath10k_wmi_alloc_chunk(struct ath10k *ar, u32 req_id,
				  u32 num_units, u32 unit_len)
{
	dma_addr_t paddr;
	u32 pool_size;
	u32 pool_size = 0;
	int idx = ar->wmi.num_mem_chunks;
	void *vaddr = NULL;

	pool_size = num_units * round_up(unit_len, 4);
	if (ar->wmi.num_mem_chunks == ARRAY_SIZE(ar->wmi.mem_chunks))
		return -ENOMEM;

	while (!vaddr && num_units) {
		pool_size = num_units * round_up(unit_len, 4);
		if (!pool_size)
			return -EINVAL;

	ar->wmi.mem_chunks[idx].vaddr = dma_alloc_coherent(ar->dev,
							   pool_size,
							   &paddr,
							   GFP_KERNEL);
	if (!ar->wmi.mem_chunks[idx].vaddr) {
		ath10k_warn(ar, "failed to allocate memory chunk\n");
		return -ENOMEM;
		vaddr = kzalloc(pool_size, GFP_KERNEL | __GFP_NOWARN);
		if (!vaddr)
			num_units /= 2;
	}

	memset(ar->wmi.mem_chunks[idx].vaddr, 0, pool_size);
	if (!num_units)
		return -ENOMEM;

	paddr = dma_map_single(ar->dev, vaddr, pool_size, DMA_TO_DEVICE);
	if (dma_mapping_error(ar->dev, paddr)) {
		kfree(vaddr);
		return -ENOMEM;
	}

	ar->wmi.mem_chunks[idx].vaddr = vaddr;
	ar->wmi.mem_chunks[idx].paddr = paddr;
	ar->wmi.mem_chunks[idx].len = pool_size;
	ar->wmi.mem_chunks[idx].req_id = req_id;
	ar->wmi.num_mem_chunks++;

	return num_units;
}

static int ath10k_wmi_alloc_host_mem(struct ath10k *ar, u32 req_id,
				     u32 num_units, u32 unit_len)
{
	int ret;

	while (num_units) {
		ret = ath10k_wmi_alloc_chunk(ar, req_id, num_units, unit_len);
		if (ret < 0)
			return ret;

		num_units -= ret;
	}

	return 0;
}

@@ -7717,10 +7741,11 @@ void ath10k_wmi_free_host_mem(struct ath10k *ar)

	/* free the host memory chunks requested by firmware */
	for (i = 0; i < ar->wmi.num_mem_chunks; i++) {
		dma_free_coherent(ar->dev,
		dma_unmap_single(ar->dev,
				 ar->wmi.mem_chunks[i].paddr,
				 ar->wmi.mem_chunks[i].len,
				  ar->wmi.mem_chunks[i].vaddr,
				  ar->wmi.mem_chunks[i].paddr);
				 DMA_TO_DEVICE);
		kfree(ar->wmi.mem_chunks[i].vaddr);
	}

	ar->wmi.num_mem_chunks = 0;
Loading