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

Commit 6606e17a authored by Jeff Garzik's avatar Jeff Garzik
Browse files

Merge branch 'upstream-jgarzik' of...

Merge branch 'upstream-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream
parents 6aab4447 b312362b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1623,7 +1623,7 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen,

	crypto_cipher_setkey(tfm, pkey, 16);
	counter = 0;
	for (i = 0; i < (sizeof(context->coeff)/sizeof(context->coeff[0])); ) {
	for (i = 0; i < ARRAY_SIZE(context->coeff); ) {
		aes_counter[15] = (u8)(counter >> 0);
		aes_counter[14] = (u8)(counter >> 8);
		aes_counter[13] = (u8)(counter >> 16);
@@ -1632,7 +1632,7 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen,
		memcpy (plain, aes_counter, 16);
		crypto_cipher_encrypt_one(tfm, plain, plain);
		cipher = plain;
		for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) {
		for (j = 0; (j < 16) && (i < ARRAY_SIZE(context->coeff)); ) {
			context->coeff[i++] = ntohl(*(u32 *)&cipher[j]);
			j += 4;
		}
+3 −5
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
#define PFX				KBUILD_MODNAME ": "

#define BCM43xx_SWITCH_CORE_MAX_RETRIES	50
#define BCM43xx_IRQWAIT_MAX_RETRIES	50
#define BCM43xx_IRQWAIT_MAX_RETRIES	100

#define BCM43xx_IO_SIZE			8192

@@ -333,7 +333,7 @@
#define BCM43xx_SBF_PS2			0x04000000
#define BCM43xx_SBF_NO_SSID_BCAST	0x08000000
#define BCM43xx_SBF_TIME_UPDATE		0x10000000
#define BCM43xx_SBF_80000000		0x80000000 /*FIXME: fix name*/
#define BCM43xx_SBF_MODE_G		0x80000000

/* Microcode */
#define BCM43xx_UCODE_REVISION		0x0000
@@ -507,8 +507,6 @@ struct bcm43xx_sprominfo {
	u8 et1macaddr[6];
	u8 et0phyaddr:5;
	u8 et1phyaddr:5;
	u8 et0mdcport:1;
	u8 et1mdcport:1;
	u8 boardrev;
	u8 locale:4;
	u8 antennas_aphy:2;
@@ -542,7 +540,7 @@ struct bcm43xx_lopair {

struct bcm43xx_phyinfo {
	/* Hardware Data */
	u8 version;
	u8 analog;
	u8 type;
	u8 rev;
	u16 antenna_diversity;
+15 −0
Original line number Diff line number Diff line
@@ -325,6 +325,21 @@ void bcm43xx_ilt_write(struct bcm43xx_private *bcm, u16 offset, u16 val)
	}
}

void bcm43xx_ilt_write32(struct bcm43xx_private *bcm, u16 offset, u32 val)
{
	if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A) {
		bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_CTRL, offset);
		mmiowb();
		bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_DATA2, (val & 0xFFFF0000) >> 16);
		bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_A_DATA1, val & 0x0000FFFF);
	} else {
		bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_CTRL, offset);
		mmiowb();
		bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_DATA2, (val & 0xFFFF0000) >> 16);
		bcm43xx_phy_write(bcm, BCM43xx_PHY_ILT_G_DATA1, val & 0x0000FFFF);
	}
}

u16 bcm43xx_ilt_read(struct bcm43xx_private *bcm, u16 offset)
{
	if (bcm43xx_current_phy(bcm)->type == BCM43xx_PHYTYPE_A) {
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ extern const u16 bcm43xx_ilt_sigmasqr2[BCM43xx_ILT_SIGMASQR_SIZE];


void bcm43xx_ilt_write(struct bcm43xx_private *bcm, u16 offset, u16 val);
void bcm43xx_ilt_write32(struct bcm43xx_private *bcm, u16 offset, u32 val);
u16 bcm43xx_ilt_read(struct bcm43xx_private *bcm, u16 offset);

#endif /* BCM43xx_ILT_H_ */
+8 −12
Original line number Diff line number Diff line
@@ -851,8 +851,6 @@ static int bcm43xx_sprom_extract(struct bcm43xx_private *bcm)
	value = sprom[BCM43xx_SPROM_ETHPHY];
	bcm->sprom.et0phyaddr = (value & 0x001F);
	bcm->sprom.et1phyaddr = (value & 0x03E0) >> 5;
	bcm->sprom.et0mdcport = (value & (1 << 14)) >> 14;
	bcm->sprom.et1mdcport = (value & (1 << 15)) >> 15;

	/* boardrev, antennas, locale */
	value = sprom[BCM43xx_SPROM_BOARDREV];
@@ -1449,12 +1447,10 @@ static void handle_irq_transmit_status(struct bcm43xx_private *bcm)

		bcm43xx_debugfs_log_txstat(bcm, &stat);

		if (stat.flags & BCM43xx_TXSTAT_FLAG_IGNORE)
		if (stat.flags & BCM43xx_TXSTAT_FLAG_AMPDU)
			continue;
		if (stat.flags & BCM43xx_TXSTAT_FLAG_INTER)
			continue;
		if (!(stat.flags & BCM43xx_TXSTAT_FLAG_ACK)) {
			//TODO: packet was not acked (was lost)
		}
		//TODO: There are more (unknown) flags to test. see bcm43xx_main.h

		if (bcm43xx_using_pio(bcm))
			bcm43xx_pio_handle_xmitstatus(bcm, &stat);
@@ -3696,7 +3692,7 @@ static int bcm43xx_read_phyinfo(struct bcm43xx_private *bcm)
{
	struct bcm43xx_phyinfo *phy = bcm43xx_current_phy(bcm);
	u16 value;
	u8 phy_version;
	u8 phy_analog;
	u8 phy_type;
	u8 phy_rev;
	int phy_rev_ok = 1;
@@ -3704,12 +3700,12 @@ static int bcm43xx_read_phyinfo(struct bcm43xx_private *bcm)

	value = bcm43xx_read16(bcm, BCM43xx_MMIO_PHY_VER);

	phy_version = (value & 0xF000) >> 12;
	phy_analog = (value & 0xF000) >> 12;
	phy_type = (value & 0x0F00) >> 8;
	phy_rev = (value & 0x000F);

	dprintk(KERN_INFO PFX "Detected PHY: Version: %x, Type %x, Revision %x\n",
		phy_version, phy_type, phy_rev);
	dprintk(KERN_INFO PFX "Detected PHY: Analog: %x, Type %x, Revision %x\n",
		phy_analog, phy_type, phy_rev);

	switch (phy_type) {
	case BCM43xx_PHYTYPE_A:
@@ -3752,7 +3748,7 @@ static int bcm43xx_read_phyinfo(struct bcm43xx_private *bcm)
		       phy_rev);
	}

	phy->version = phy_version;
	phy->analog = phy_analog;
	phy->type = phy_type;
	phy->rev = phy_rev;
	if ((phy_type == BCM43xx_PHYTYPE_B) || (phy_type == BCM43xx_PHYTYPE_G)) {
Loading