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

Commit 77443951 authored by Johannes Berg's avatar Johannes Berg
Browse files

Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next

parents b571a697 a910e4a9
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -132,9 +132,7 @@
!Finclude/net/cfg80211.h cfg80211_send_rx_assoc
!Finclude/net/cfg80211.h cfg80211_send_rx_assoc
!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout
!Finclude/net/cfg80211.h cfg80211_send_assoc_timeout
!Finclude/net/cfg80211.h cfg80211_send_deauth
!Finclude/net/cfg80211.h cfg80211_send_deauth
!Finclude/net/cfg80211.h __cfg80211_send_deauth
!Finclude/net/cfg80211.h cfg80211_send_disassoc
!Finclude/net/cfg80211.h cfg80211_send_disassoc
!Finclude/net/cfg80211.h __cfg80211_send_disassoc
!Finclude/net/cfg80211.h cfg80211_ibss_joined
!Finclude/net/cfg80211.h cfg80211_ibss_joined
!Finclude/net/cfg80211.h cfg80211_connect_result
!Finclude/net/cfg80211.h cfg80211_connect_result
!Finclude/net/cfg80211.h cfg80211_roamed
!Finclude/net/cfg80211.h cfg80211_roamed
+5 −0
Original line number Original line Diff line number Diff line
@@ -2299,6 +2299,11 @@ M: Jaya Kumar <jayakumar.alsa@gmail.com>
S:	Maintained
S:	Maintained
F:	sound/pci/cs5535audio/
F:	sound/pci/cs5535audio/


CW1200 WLAN driver
M:     Solomon Peachy <pizza@shaftnet.org>
S:     Maintained
F:     drivers/net/wireless/cw1200/

CX18 VIDEO4LINUX DRIVER
CX18 VIDEO4LINUX DRIVER
M:	Andy Walls <awalls@md.metrocast.net>
M:	Andy Walls <awalls@md.metrocast.net>
L:	ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
L:	ivtv-devel@ivtvdriver.org (moderated for non-subscribers)
+39 −32
Original line number Original line Diff line number Diff line
@@ -72,12 +72,12 @@ static int bcma_fill_sprom_with_fallback(struct bcma_bus *bus,
 * R/W ops.
 * R/W ops.
 **************************************************/
 **************************************************/


static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom)
static void bcma_sprom_read(struct bcma_bus *bus, u16 offset, u16 *sprom,
			    size_t words)
{
{
	int i;
	int i;
	for (i = 0; i < SSB_SPROMSIZE_WORDS_R4; i++)
	for (i = 0; i < words; i++)
		sprom[i] = bcma_read16(bus->drv_cc.core,
		sprom[i] = bcma_read16(bus->drv_cc.core, offset + (i * 2));
				       offset + (i * 2));
}
}


/**************************************************
/**************************************************
@@ -124,29 +124,29 @@ static inline u8 bcma_crc8(u8 crc, u8 data)
	return t[crc ^ data];
	return t[crc ^ data];
}
}


static u8 bcma_sprom_crc(const u16 *sprom)
static u8 bcma_sprom_crc(const u16 *sprom, size_t words)
{
{
	int word;
	int word;
	u8 crc = 0xFF;
	u8 crc = 0xFF;


	for (word = 0; word < SSB_SPROMSIZE_WORDS_R4 - 1; word++) {
	for (word = 0; word < words - 1; word++) {
		crc = bcma_crc8(crc, sprom[word] & 0x00FF);
		crc = bcma_crc8(crc, sprom[word] & 0x00FF);
		crc = bcma_crc8(crc, (sprom[word] & 0xFF00) >> 8);
		crc = bcma_crc8(crc, (sprom[word] & 0xFF00) >> 8);
	}
	}
	crc = bcma_crc8(crc, sprom[SSB_SPROMSIZE_WORDS_R4 - 1] & 0x00FF);
	crc = bcma_crc8(crc, sprom[words - 1] & 0x00FF);
	crc ^= 0xFF;
	crc ^= 0xFF;


	return crc;
	return crc;
}
}


static int bcma_sprom_check_crc(const u16 *sprom)
static int bcma_sprom_check_crc(const u16 *sprom, size_t words)
{
{
	u8 crc;
	u8 crc;
	u8 expected_crc;
	u8 expected_crc;
	u16 tmp;
	u16 tmp;


	crc = bcma_sprom_crc(sprom);
	crc = bcma_sprom_crc(sprom, words);
	tmp = sprom[SSB_SPROMSIZE_WORDS_R4 - 1] & SSB_SPROM_REVISION_CRC;
	tmp = sprom[words - 1] & SSB_SPROM_REVISION_CRC;
	expected_crc = tmp >> SSB_SPROM_REVISION_CRC_SHIFT;
	expected_crc = tmp >> SSB_SPROM_REVISION_CRC_SHIFT;
	if (crc != expected_crc)
	if (crc != expected_crc)
		return -EPROTO;
		return -EPROTO;
@@ -154,21 +154,25 @@ static int bcma_sprom_check_crc(const u16 *sprom)
	return 0;
	return 0;
}
}


static int bcma_sprom_valid(const u16 *sprom)
static int bcma_sprom_valid(struct bcma_bus *bus, const u16 *sprom,
			    size_t words)
{
{
	u16 revision;
	u16 revision;
	int err;
	int err;


	err = bcma_sprom_check_crc(sprom);
	err = bcma_sprom_check_crc(sprom, words);
	if (err)
	if (err)
		return err;
		return err;


	revision = sprom[SSB_SPROMSIZE_WORDS_R4 - 1] & SSB_SPROM_REVISION_REV;
	revision = sprom[words - 1] & SSB_SPROM_REVISION_REV;
	if (revision != 8 && revision != 9) {
	if (revision != 8 && revision != 9 && revision != 10) {
		pr_err("Unsupported SPROM revision: %d\n", revision);
		pr_err("Unsupported SPROM revision: %d\n", revision);
		return -ENOENT;
		return -ENOENT;
	}
	}


	bus->sprom.revision = revision;
	bcma_debug(bus, "Found SPROM revision %d\n", revision);

	return 0;
	return 0;
}
}


@@ -208,9 +212,6 @@ static void bcma_sprom_extract_r8(struct bcma_bus *bus, const u16 *sprom)
	BUILD_BUG_ON(ARRAY_SIZE(pwr_info_offset) !=
	BUILD_BUG_ON(ARRAY_SIZE(pwr_info_offset) !=
			ARRAY_SIZE(bus->sprom.core_pwr_info));
			ARRAY_SIZE(bus->sprom.core_pwr_info));


	bus->sprom.revision = sprom[SSB_SPROMSIZE_WORDS_R4 - 1] &
		SSB_SPROM_REVISION_REV;

	for (i = 0; i < 3; i++) {
	for (i = 0; i < 3; i++) {
		v = sprom[SPOFF(SSB_SPROM8_IL0MAC) + i];
		v = sprom[SPOFF(SSB_SPROM8_IL0MAC) + i];
		*(((__be16 *)bus->sprom.il0mac) + i) = cpu_to_be16(v);
		*(((__be16 *)bus->sprom.il0mac) + i) = cpu_to_be16(v);
@@ -502,7 +503,6 @@ static bool bcma_sprom_onchip_available(struct bcma_bus *bus)
	case BCMA_CHIP_ID_BCM4331:
	case BCMA_CHIP_ID_BCM4331:
		present = chip_status & BCMA_CC_CHIPST_4331_OTP_PRESENT;
		present = chip_status & BCMA_CC_CHIPST_4331_OTP_PRESENT;
		break;
		break;

	case BCMA_CHIP_ID_BCM43224:
	case BCMA_CHIP_ID_BCM43224:
	case BCMA_CHIP_ID_BCM43225:
	case BCMA_CHIP_ID_BCM43225:
		/* for these chips OTP is always available */
		/* for these chips OTP is always available */
@@ -550,7 +550,9 @@ int bcma_sprom_get(struct bcma_bus *bus)
{
{
	u16 offset = BCMA_CC_SPROM;
	u16 offset = BCMA_CC_SPROM;
	u16 *sprom;
	u16 *sprom;
	int err = 0;
	size_t sprom_sizes[] = { SSB_SPROMSIZE_WORDS_R4,
				 SSB_SPROMSIZE_WORDS_R10, };
	int i, err = 0;


	if (!bus->drv_cc.core)
	if (!bus->drv_cc.core)
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;
@@ -579,32 +581,37 @@ int bcma_sprom_get(struct bcma_bus *bus)
		}
		}
	}
	}


	sprom = kcalloc(SSB_SPROMSIZE_WORDS_R4, sizeof(u16),
			GFP_KERNEL);
	if (!sprom)
		return -ENOMEM;

	if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 ||
	if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 ||
	    bus->chipinfo.id == BCMA_CHIP_ID_BCM43431)
	    bus->chipinfo.id == BCMA_CHIP_ID_BCM43431)
		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);
		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);


	bcma_debug(bus, "SPROM offset 0x%x\n", offset);
	bcma_debug(bus, "SPROM offset 0x%x\n", offset);
	bcma_sprom_read(bus, offset, sprom);
	for (i = 0; i < ARRAY_SIZE(sprom_sizes); i++) {
		size_t words = sprom_sizes[i];

		sprom = kcalloc(words, sizeof(u16), GFP_KERNEL);
		if (!sprom)
			return -ENOMEM;

		bcma_sprom_read(bus, offset, sprom, words);
		err = bcma_sprom_valid(bus, sprom, words);
		if (!err)
			break;

		kfree(sprom);
	}


	if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 ||
	if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 ||
	    bus->chipinfo.id == BCMA_CHIP_ID_BCM43431)
	    bus->chipinfo.id == BCMA_CHIP_ID_BCM43431)
		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);
		bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);


	err = bcma_sprom_valid(sprom);
	if (err) {
	if (err) {
		bcma_warn(bus, "invalid sprom read from the PCIe card, try to use fallback sprom\n");
		bcma_warn(bus, "Invalid SPROM read from the PCIe card, trying to use fallback SPROM\n");
		err = bcma_fill_sprom_with_fallback(bus, &bus->sprom);
		err = bcma_fill_sprom_with_fallback(bus, &bus->sprom);
		goto out;
	} else {
	}

		bcma_sprom_extract_r8(bus, sprom);
		bcma_sprom_extract_r8(bus, sprom);

out:
		kfree(sprom);
		kfree(sprom);
	}

	return err;
	return err;
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -280,5 +280,6 @@ source "drivers/net/wireless/rtlwifi/Kconfig"
source "drivers/net/wireless/ti/Kconfig"
source "drivers/net/wireless/ti/Kconfig"
source "drivers/net/wireless/zd1211rw/Kconfig"
source "drivers/net/wireless/zd1211rw/Kconfig"
source "drivers/net/wireless/mwifiex/Kconfig"
source "drivers/net/wireless/mwifiex/Kconfig"
source "drivers/net/wireless/cw1200/Kconfig"


endif # WLAN
endif # WLAN
+2 −0
Original line number Original line Diff line number Diff line
@@ -57,3 +57,5 @@ obj-$(CONFIG_MWIFIEX) += mwifiex/


obj-$(CONFIG_BRCMFMAC)	+= brcm80211/
obj-$(CONFIG_BRCMFMAC)	+= brcm80211/
obj-$(CONFIG_BRCMSMAC)	+= brcm80211/
obj-$(CONFIG_BRCMSMAC)	+= brcm80211/

obj-$(CONFIG_CW1200)	+= cw1200/
Loading