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

Commit e697b8d1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (39 commits)
  [INET]: Small possible memory leak in FIB rules
  [NETNS]: init dev_base_lock only once
  [UNIX]: The unix_nr_socks limit can be exceeded
  [AF_UNIX]: Convert socks to unix_socks in scan_inflight, not in callbacks
  [AF_UNIX]: Make unix_tot_inflight counter non-atomic
  [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded
  ssb: Fix PCMCIA-host lowlevel bus access
  mac80211: fix MAC80211_RCSIMPLE Kconfig
  mac80211: make "decrypt failed" messages conditional upon MAC80211_DEBUG
  mac80211: use IW_AUTH_PRIVACY_INVOKED rather than IW_AUTH_KEY_MGMT
  mac80211: remove unused driver ops
  mac80211: remove ieee80211_common.h
  softmac: MAINTAINERS update
  rfkill: Fix sparse warning
  rfkill: Use mutex_lock() at register and add sanity check
  iwlwifi: select proper rate control algorithm
  mac80211: allow driver to ask for a rate control algorithm
  mac80211: don't allow registering the same rate control twice
  rfkill: Use subsys_initcall
  mac80211: make simple rate control algorithm built-in
  ...
parents 46015977 2994c638
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -3454,15 +3454,10 @@ L: lm-sensors@lm-sensors.org
S:	Maintained

SOFTMAC LAYER (IEEE 802.11)
P:	Johannes Berg
M:	johannes@sipsolutions.net
P:	Joe Jezak
M:	josejx@gentoo.org
P:	Daniel Drake
M:	dsd@gentoo.org
W:	http://softmac.sipsolutions.net/
L:	linux-wireless@vger.kernel.org
S:	Maintained
S:	Obsolete

SOFTWARE RAID (Multiple Disks) SUPPORT
P:	Ingo Molnar
+2 −0
Original line number Diff line number Diff line
@@ -8354,6 +8354,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
	}
	SET_IEEE80211_DEV(hw, &pdev->dev);

	hw->rate_control_algorithm = "iwl-3945-rs";

	IWL_DEBUG_INFO("*** LOAD DRIVER ***\n");
	priv = hw->priv;
	priv->hw = hw;
+2 −0
Original line number Diff line number Diff line
@@ -8955,6 +8955,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
	}
	SET_IEEE80211_DEV(hw, &pdev->dev);

	hw->rate_control_algorithm = "iwl-4965-rs";

	IWL_DEBUG_INFO("*** LOAD DRIVER ***\n");
	priv = hw->priv;
	priv->hw = hw;
+5 −1
Original line number Diff line number Diff line
@@ -440,6 +440,7 @@ static int ssb_devices_register(struct ssb_bus *bus)
			break;
		case SSB_BUSTYPE_PCMCIA:
#ifdef CONFIG_SSB_PCMCIAHOST
			sdev->irq = bus->host_pcmcia->irq.AssignedIRQ;
			dev->parent = &bus->host_pcmcia->dev;
#endif
			break;
@@ -1147,7 +1148,10 @@ static int __init ssb_modinit(void)

	return err;
}
subsys_initcall(ssb_modinit);
/* ssb must be initialized after PCI but before the ssb drivers.
 * That means we must use some initcall between subsys_initcall
 * and device_initcall. */
fs_initcall(ssb_modinit);

static void __exit ssb_modexit(void)
{
+28 −28
Original line number Diff line number Diff line
@@ -63,17 +63,17 @@ int ssb_pcmcia_switch_coreidx(struct ssb_bus *bus,
		err = pcmcia_access_configuration_register(pdev, &reg);
		if (err != CS_SUCCESS)
			goto error;
		read_addr |= (reg.Value & 0xF) << 12;
		read_addr |= ((u32)(reg.Value & 0x0F)) << 12;
		reg.Offset = 0x30;
		err = pcmcia_access_configuration_register(pdev, &reg);
		if (err != CS_SUCCESS)
			goto error;
		read_addr |= reg.Value << 16;
		read_addr |= ((u32)reg.Value) << 16;
		reg.Offset = 0x32;
		err = pcmcia_access_configuration_register(pdev, &reg);
		if (err != CS_SUCCESS)
			goto error;
		read_addr |= reg.Value << 24;
		read_addr |= ((u32)reg.Value) << 24;

		cur_core = (read_addr - SSB_ENUM_BASE) / SSB_CORE_SIZE;
		if (cur_core == coreidx)
@@ -152,28 +152,29 @@ error:
	goto out_unlock;
}

/* These are the main device register access functions.
 * do_select_core is inline to have the likely hotpath inline.
 * All unlikely codepaths are out-of-line. */
static inline int do_select_core(struct ssb_bus *bus,
				 struct ssb_device *dev,
static int select_core_and_segment(struct ssb_device *dev,
				   u16 *offset)
{
	struct ssb_bus *bus = dev->bus;
	int err;
	u8 need_seg = (*offset >= 0x800) ? 1 : 0;
	u8 need_segment;

	if (*offset >= 0x800) {
		*offset -= 0x800;
		need_segment = 1;
	} else
		need_segment = 0;

	if (unlikely(dev != bus->mapped_device)) {
		err = ssb_pcmcia_switch_core(bus, dev);
		if (unlikely(err))
			return err;
	}
	if (unlikely(need_seg != bus->mapped_pcmcia_seg)) {
		err = ssb_pcmcia_switch_segment(bus, need_seg);
	if (unlikely(need_segment != bus->mapped_pcmcia_seg)) {
		err = ssb_pcmcia_switch_segment(bus, need_segment);
		if (unlikely(err))
			return err;
	}
	if (need_seg == 1)
		*offset -= 0x800;

	return 0;
}
@@ -181,32 +182,31 @@ static inline int do_select_core(struct ssb_bus *bus,
static u16 ssb_pcmcia_read16(struct ssb_device *dev, u16 offset)
{
	struct ssb_bus *bus = dev->bus;
	u16 x;

	if (unlikely(do_select_core(bus, dev, &offset)))
	if (unlikely(select_core_and_segment(dev, &offset)))
		return 0xFFFF;
	x = readw(bus->mmio + offset);

	return x;
	return readw(bus->mmio + offset);
}

static u32 ssb_pcmcia_read32(struct ssb_device *dev, u16 offset)
{
	struct ssb_bus *bus = dev->bus;
	u32 x;
	u32 lo, hi;

	if (unlikely(do_select_core(bus, dev, &offset)))
	if (unlikely(select_core_and_segment(dev, &offset)))
		return 0xFFFFFFFF;
	x = readl(bus->mmio + offset);
	lo = readw(bus->mmio + offset);
	hi = readw(bus->mmio + offset + 2);

	return x;
	return (lo | (hi << 16));
}

static void ssb_pcmcia_write16(struct ssb_device *dev, u16 offset, u16 value)
{
	struct ssb_bus *bus = dev->bus;

	if (unlikely(do_select_core(bus, dev, &offset)))
	if (unlikely(select_core_and_segment(dev, &offset)))
		return;
	writew(value, bus->mmio + offset);
}
@@ -215,12 +215,12 @@ static void ssb_pcmcia_write32(struct ssb_device *dev, u16 offset, u32 value)
{
	struct ssb_bus *bus = dev->bus;

	if (unlikely(do_select_core(bus, dev, &offset)))
	if (unlikely(select_core_and_segment(dev, &offset)))
		return;
	readw(bus->mmio + offset);
	writew(value >> 16, bus->mmio + offset + 2);
	readw(bus->mmio + offset);
	writew(value, bus->mmio + offset);
	writeb((value & 0xFF000000) >> 24, bus->mmio + offset + 3);
	writeb((value & 0x00FF0000) >> 16, bus->mmio + offset + 2);
	writeb((value & 0x0000FF00) >> 8, bus->mmio + offset + 1);
	writeb((value & 0x000000FF) >> 0, bus->mmio + offset + 0);
}

/* Not "static", as it's used in main.c */
Loading