Skip to content
Permalink
Browse files

Restored the way to access MAC register for 8864.

In this way, it will get correct value.

Signed-off-by: David Lin <dlin@marvell.com>
  • Loading branch information
yuhhaurlin committed Dec 22, 2016
1 parent bb70b40 commit ccbfc8e329d4ed3090cc370d337f0d5420aacb41
Showing with 18 additions and 12 deletions.
  1. +1 −0 dev.h
  2. +17 −12 fwcmd.c
1 dev.h
@@ -30,6 +30,7 @@
#define MWL_DRV_VERSION "10.3.2.0-20161220"

#define MAC_REG_ADDR(offset) (offset)
#define MAC_REG_ADDR_PCI(offset) ((priv->iobase1 + 0xA000) + offset)

#define MCU_CCA_CNT MAC_REG_ADDR(0x06A0)
#define MCU_TXPE_CNT MAC_REG_ADDR(0x06A4)
29 fwcmd.c
@@ -888,18 +888,23 @@ static int mwl_fwcmd_encryption_set_cmd_info(struct hostcmd_cmd_set_key *cmd,

static u32 pci_read_mac_reg(struct mwl_priv *priv, u32 offset)
{
u32 *addr_val = kmalloc(64 * sizeof(u32), GFP_ATOMIC);
u32 val;

if(addr_val)
{
mwl_fwcmd_get_addr_value(priv->hw, 0x8000a000 + offset, 4,
addr_val, 0);
val = addr_val[0];
kfree(addr_val);
return val;
}
return 0;
if (priv->chip_type == MWL8964) {
u32 *addr_val = kmalloc(64 * sizeof(u32), GFP_ATOMIC);
u32 val;

if(addr_val)
{
mwl_fwcmd_get_addr_value(priv->hw,
0x8000a000 + offset, 4,
addr_val, 0);
val = addr_val[0];
kfree(addr_val);
return val;
}
return 0;
} else
return le32_to_cpu(*(volatile unsigned long *)
(MAC_REG_ADDR_PCI(offset)));
}

void mwl_fwcmd_reset(struct ieee80211_hw *hw)

0 comments on commit ccbfc8e

Please sign in to comment.
You can’t perform that action at this time.