* [PATCH 23/28] mwl8k: implement AP firmware antenna configuration
From: Lennert Buytenhek @ 2009-10-22 18:21 UTC (permalink / raw)
To: linux-wireless
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 44 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 4a70ce1..0e26a96 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -279,6 +279,7 @@ static const struct ieee80211_rate mwl8k_rates[] = {
#define MWL8K_CMD_GET_STAT 0x0014
#define MWL8K_CMD_RADIO_CONTROL 0x001c
#define MWL8K_CMD_RF_TX_POWER 0x001e
+#define MWL8K_CMD_RF_ANTENNA 0x0020
#define MWL8K_CMD_SET_PRE_SCAN 0x0107
#define MWL8K_CMD_SET_POST_SCAN 0x0108
#define MWL8K_CMD_SET_RF_CHANNEL 0x010a
@@ -310,6 +311,7 @@ static const char *mwl8k_cmd_name(u16 cmd, char *buf, int bufsize)
MWL8K_CMDNAME(GET_STAT);
MWL8K_CMDNAME(RADIO_CONTROL);
MWL8K_CMDNAME(RF_TX_POWER);
+ MWL8K_CMDNAME(RF_ANTENNA);
MWL8K_CMDNAME(SET_PRE_SCAN);
MWL8K_CMDNAME(SET_POST_SCAN);
MWL8K_CMDNAME(SET_RF_CHANNEL);
@@ -1918,6 +1920,39 @@ static int mwl8k_cmd_802_11_rf_tx_power(struct ieee80211_hw *hw, int dBm)
}
/*
+ * CMD_RF_ANTENNA.
+ */
+struct mwl8k_cmd_rf_antenna {
+ struct mwl8k_cmd_pkt header;
+ __le16 antenna;
+ __le16 mode;
+} __attribute__((packed));
+
+#define MWL8K_RF_ANTENNA_RX 1
+#define MWL8K_RF_ANTENNA_TX 2
+
+static int
+mwl8k_cmd_rf_antenna(struct ieee80211_hw *hw, int antenna, int mask)
+{
+ struct mwl8k_cmd_rf_antenna *cmd;
+ int rc;
+
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
+ if (cmd == NULL)
+ return -ENOMEM;
+
+ cmd->header.code = cpu_to_le16(MWL8K_CMD_RF_ANTENNA);
+ cmd->header.length = cpu_to_le16(sizeof(*cmd));
+ cmd->antenna = cpu_to_le16(antenna);
+ cmd->mode = cpu_to_le16(mask);
+
+ rc = mwl8k_post_cmd(hw, &cmd->header);
+ kfree(cmd);
+
+ return rc;
+}
+
+/*
* CMD_SET_PRE_SCAN.
*/
struct mwl8k_cmd_set_pre_scan {
@@ -2831,8 +2866,13 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
if (rc)
goto out;
- if (mwl8k_cmd_mimo_config(hw, 0x7, 0x7))
- rc = -EINVAL;
+ if (priv->ap_fw) {
+ rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_RX, 0x7);
+ if (!rc)
+ rc = mwl8k_cmd_rf_antenna(hw, MWL8K_RF_ANTENNA_TX, 0x7);
+ } else {
+ rc = mwl8k_cmd_mimo_config(hw, 0x7, 0x7);
+ }
out:
mwl8k_fw_unlock(hw);
--
1.5.6.4
^ permalink raw reply related
* [PATCH 18/28] mwl8k: use pci_unmap_addr{,set}() to keep track of unmap addresses on rx
From: Lennert Buytenhek @ 2009-10-22 18:20 UTC (permalink / raw)
To: linux-wireless
Instead of reading back the unmap address from the receive
descriptor when doing receive processing, use DECLARE_PCI_UNMAP_ADDR
and pci_unmap_addr{,set}() to keep track of these addresses.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 55 +++++++++++++++++++++++-------------------
1 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 703c306..96faec6 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -96,7 +96,10 @@ struct mwl8k_rx_queue {
struct mwl8k_rx_desc *rxd;
dma_addr_t rxd_dma;
- struct sk_buff **skb;
+ struct {
+ struct sk_buff *skb;
+ DECLARE_PCI_UNMAP_ADDR(dma)
+ } *buf;
};
struct mwl8k_tx_queue {
@@ -790,14 +793,14 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index)
}
memset(rxq->rxd, 0, size);
- rxq->skb = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->skb), GFP_KERNEL);
- if (rxq->skb == NULL) {
+ rxq->buf = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->buf), GFP_KERNEL);
+ if (rxq->buf == NULL) {
printk(KERN_ERR "%s: failed to alloc RX skbuff list\n",
wiphy_name(hw->wiphy));
pci_free_consistent(priv->pdev, size, rxq->rxd, rxq->rxd_dma);
return -ENOMEM;
}
- memset(rxq->skb, 0, MWL8K_RX_DESCS * sizeof(*rxq->skb));
+ memset(rxq->buf, 0, MWL8K_RX_DESCS * sizeof(*rxq->buf));
for (i = 0; i < MWL8K_RX_DESCS; i++) {
struct mwl8k_rx_desc *rx_desc;
@@ -823,6 +826,7 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
refilled = 0;
while (rxq->rxd_count < MWL8K_RX_DESCS && limit--) {
struct sk_buff *skb;
+ dma_addr_t addr;
int rx;
skb = dev_alloc_skb(MWL8K_RX_MAXSZ);
@@ -834,12 +838,13 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
rx = rxq->tail;
rxq->tail = (rx + 1) % MWL8K_RX_DESCS;
- rxq->rxd[rx].pkt_phys_addr =
- cpu_to_le32(pci_map_single(priv->pdev, skb->data,
- MWL8K_RX_MAXSZ, DMA_FROM_DEVICE));
+ addr = pci_map_single(priv->pdev, skb->data,
+ MWL8K_RX_MAXSZ, DMA_FROM_DEVICE);
rxq->rxd[rx].pkt_len = cpu_to_le16(MWL8K_RX_MAXSZ);
- rxq->skb[rx] = skb;
+ rxq->rxd[rx].pkt_phys_addr = cpu_to_le32(addr);
+ rxq->buf[rx].skb = skb;
+ pci_unmap_addr_set(&rxq->buf[rx], dma, addr);
wmb();
rxq->rxd[rx].rx_ctrl = 0;
@@ -857,19 +862,19 @@ static void mwl8k_rxq_deinit(struct ieee80211_hw *hw, int index)
int i;
for (i = 0; i < MWL8K_RX_DESCS; i++) {
- if (rxq->skb[i] != NULL) {
- unsigned long addr;
-
- addr = le32_to_cpu(rxq->rxd[i].pkt_phys_addr);
- pci_unmap_single(priv->pdev, addr, MWL8K_RX_MAXSZ,
- PCI_DMA_FROMDEVICE);
- kfree_skb(rxq->skb[i]);
- rxq->skb[i] = NULL;
+ if (rxq->buf[i].skb != NULL) {
+ pci_unmap_single(priv->pdev,
+ pci_unmap_addr(&rxq->buf[i], dma),
+ MWL8K_RX_MAXSZ, PCI_DMA_FROMDEVICE);
+ pci_unmap_addr_set(&rxq->buf[i], dma, 0);
+
+ kfree_skb(rxq->buf[i].skb);
+ rxq->buf[i].skb = NULL;
}
}
- kfree(rxq->skb);
- rxq->skb = NULL;
+ kfree(rxq->buf);
+ rxq->buf = NULL;
pci_free_consistent(priv->pdev,
MWL8K_RX_DESCS * sizeof(struct mwl8k_rx_desc),
@@ -919,7 +924,6 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
struct mwl8k_rx_desc *rx_desc;
struct sk_buff *skb;
struct ieee80211_rx_status status;
- unsigned long addr;
struct ieee80211_hdr *wh;
u16 rate_info;
@@ -928,18 +932,19 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
break;
rmb();
- skb = rxq->skb[rxq->head];
+ skb = rxq->buf[rxq->head].skb;
if (skb == NULL)
break;
- rxq->skb[rxq->head] = NULL;
+ rxq->buf[rxq->head].skb = NULL;
+
+ pci_unmap_single(priv->pdev,
+ pci_unmap_addr(&rxq->buf[rxq->head], dma),
+ MWL8K_RX_MAXSZ, PCI_DMA_FROMDEVICE);
+ pci_unmap_addr_set(&rxq->buf[rxq->head], dma, 0);
rxq->head = (rxq->head + 1) % MWL8K_RX_DESCS;
rxq->rxd_count--;
- addr = le32_to_cpu(rx_desc->pkt_phys_addr);
- pci_unmap_single(priv->pdev, addr,
- MWL8K_RX_MAXSZ, PCI_DMA_FROMDEVICE);
-
skb_put(skb, le16_to_cpu(rx_desc->pkt_len));
mwl8k_remove_dma_header(skb);
--
1.5.6.4
^ permalink raw reply related
* [PATCH 15/28] mwl8k: change pci id table driver data to a structure pointer
From: Lennert Buytenhek @ 2009-10-22 18:20 UTC (permalink / raw)
To: linux-wireless
To prepare for adding support for more device types, introduce a
new structure, mwl8k_device_info, where per-device information can
be stored, and change the pci id table driver data from an integer
indicating only the part number to a pointer to a mwl8k_device_info
structure.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 47 ++++++++++++++++++++++++++---------------
1 files changed, 30 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 7aea8eb..49edd0c 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -27,13 +27,6 @@
#define MWL8K_NAME KBUILD_MODNAME
#define MWL8K_VERSION "0.10"
-static DEFINE_PCI_DEVICE_TABLE(mwl8k_table) = {
- { PCI_VDEVICE(MARVELL, 0x2a2b), .driver_data = 8687, },
- { PCI_VDEVICE(MARVELL, 0x2a30), .driver_data = 8687, },
- { }
-};
-MODULE_DEVICE_TABLE(pci, mwl8k_table);
-
/* Register definitions */
#define MWL8K_HIU_GEN_PTR 0x00000c10
#define MWL8K_MODE_STA 0x0000005a
@@ -86,6 +79,10 @@ MODULE_DEVICE_TABLE(pci, mwl8k_table);
#define MWL8K_RX_QUEUES 1
#define MWL8K_TX_QUEUES 4
+struct mwl8k_device_info {
+ int part_num;
+};
+
struct mwl8k_rx_queue {
int rxd_count;
@@ -129,9 +126,10 @@ struct mwl8k_priv {
struct pci_dev *pdev;
+ struct mwl8k_device_info *device_info;
+
/* firmware files and meta data */
struct mwl8k_firmware fw;
- u32 part_num;
/* firmware access */
struct mutex fw_mutex;
@@ -355,15 +353,13 @@ static int mwl8k_request_fw(struct mwl8k_priv *priv,
fname, &priv->pdev->dev);
}
-static int mwl8k_request_firmware(struct mwl8k_priv *priv, u32 part_num)
+static int mwl8k_request_firmware(struct mwl8k_priv *priv)
{
u8 filename[64];
int rc;
- priv->part_num = part_num;
-
snprintf(filename, sizeof(filename),
- "mwl8k/helper_%u.fw", priv->part_num);
+ "mwl8k/helper_%u.fw", priv->device_info->part_num);
rc = mwl8k_request_fw(priv, filename, &priv->fw.helper);
if (rc) {
@@ -373,7 +369,7 @@ static int mwl8k_request_firmware(struct mwl8k_priv *priv, u32 part_num)
}
snprintf(filename, sizeof(filename),
- "mwl8k/fmimage_%u.fw", priv->part_num);
+ "mwl8k/fmimage_%u.fw", priv->device_info->part_num);
rc = mwl8k_request_fw(priv, filename, &priv->fw.ucode);
if (rc) {
@@ -2940,6 +2936,22 @@ static void mwl8k_finalize_join_worker(struct work_struct *work)
priv->beacon_skb = NULL;
}
+static struct mwl8k_device_info di_8687 = {
+ .part_num = 8687,
+};
+
+static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
+ {
+ PCI_VDEVICE(MARVELL, 0x2a2b),
+ .driver_data = (unsigned long)&di_8687,
+ }, {
+ PCI_VDEVICE(MARVELL, 0x2a30),
+ .driver_data = (unsigned long)&di_8687,
+ }, {
+ },
+};
+MODULE_DEVICE_TABLE(pci, mwl8k_pci_id_table);
+
static int __devinit mwl8k_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
@@ -2980,6 +2992,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
priv = hw->priv;
priv->hw = hw;
priv->pdev = pdev;
+ priv->device_info = (void *)id->driver_data;
priv->sniffer_enabled = false;
priv->wmm_enabled = false;
priv->pending_tx_pkts = 0;
@@ -3091,7 +3104,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
mwl8k_hw_reset(priv);
/* Ask userland hotplug daemon for the device firmware */
- rc = mwl8k_request_firmware(priv, (u32)id->driver_data);
+ rc = mwl8k_request_firmware(priv);
if (rc) {
printk(KERN_ERR "%s: Firmware files not found\n",
wiphy_name(hw->wiphy));
@@ -3151,8 +3164,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
}
printk(KERN_INFO "%s: 88w%u v%d, %pM, firmware version %u.%u.%u.%u\n",
- wiphy_name(hw->wiphy), priv->part_num, priv->hw_rev,
- hw->wiphy->perm_addr,
+ wiphy_name(hw->wiphy), priv->device_info->part_num,
+ priv->hw_rev, hw->wiphy->perm_addr,
(priv->fw_rev >> 24) & 0xff, (priv->fw_rev >> 16) & 0xff,
(priv->fw_rev >> 8) & 0xff, priv->fw_rev & 0xff);
@@ -3238,7 +3251,7 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev)
static struct pci_driver mwl8k_driver = {
.name = MWL8K_NAME,
- .id_table = mwl8k_table,
+ .id_table = mwl8k_pci_id_table,
.probe = mwl8k_probe,
.remove = __devexit_p(mwl8k_remove),
.shutdown = __devexit_p(mwl8k_shutdown),
--
1.5.6.4
^ permalink raw reply related
* [PATCH 24/28] mwl8k: add AP firmware handling to ->configure_filter()
From: Lennert Buytenhek @ 2009-10-22 18:21 UTC (permalink / raw)
To: linux-wireless
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 0e26a96..815f73f 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -3013,6 +3013,16 @@ static void mwl8k_configure_filter(struct ieee80211_hw *hw,
struct mwl8k_cmd_pkt *cmd = (void *)(unsigned long)multicast;
/*
+ * AP firmware doesn't allow fine-grained control over
+ * the receive filter.
+ */
+ if (priv->ap_fw) {
+ *total_flags &= FIF_ALLMULTI | FIF_BCN_PRBRESP_PROMISC;
+ kfree(cmd);
+ return;
+ }
+
+ /*
* Enable hardware sniffer mode if FIF_CONTROL or
* FIF_OTHER_BSS is requested.
*/
--
1.5.6.4
^ permalink raw reply related
* [PATCH 14/28] mwl8k: pci BAR mapping changes
From: Lennert Buytenhek @ 2009-10-22 18:20 UTC (permalink / raw)
To: linux-wireless
Map BAR0 as well, as we need to write to it during init on some chips.
Also, if BAR0 is a 64bit BAR, the register BAR becomes BAR2, so try
mapping BAR2 if mapping BAR1 fails.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index f282550..7aea8eb 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -123,6 +123,7 @@ struct mwl8k_firmware {
};
struct mwl8k_priv {
+ void __iomem *sram;
void __iomem *regs;
struct ieee80211_hw *hw;
@@ -2986,13 +2987,27 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
SET_IEEE80211_DEV(hw, &pdev->dev);
pci_set_drvdata(pdev, hw);
- priv->regs = pci_iomap(pdev, 1, 0x10000);
- if (priv->regs == NULL) {
- printk(KERN_ERR "%s: Cannot map device memory\n",
+ priv->sram = pci_iomap(pdev, 0, 0x10000);
+ if (priv->sram == NULL) {
+ printk(KERN_ERR "%s: Cannot map device SRAM\n",
wiphy_name(hw->wiphy));
goto err_iounmap;
}
+ /*
+ * If BAR0 is a 32 bit BAR, the register BAR will be BAR1.
+ * If BAR0 is a 64 bit BAR, the register BAR will be BAR2.
+ */
+ priv->regs = pci_iomap(pdev, 1, 0x10000);
+ if (priv->regs == NULL) {
+ priv->regs = pci_iomap(pdev, 2, 0x10000);
+ if (priv->regs == NULL) {
+ printk(KERN_ERR "%s: Cannot map device registers\n",
+ wiphy_name(hw->wiphy));
+ goto err_iounmap;
+ }
+ }
+
memcpy(priv->channels, mwl8k_channels, sizeof(mwl8k_channels));
priv->band.band = IEEE80211_BAND_2GHZ;
priv->band.channels = priv->channels;
@@ -3164,6 +3179,9 @@ err_iounmap:
if (priv->regs != NULL)
pci_iounmap(pdev, priv->regs);
+ if (priv->sram != NULL)
+ pci_iounmap(pdev, priv->sram);
+
pci_set_drvdata(pdev, NULL);
ieee80211_free_hw(hw);
@@ -3211,6 +3229,7 @@ static void __devexit mwl8k_remove(struct pci_dev *pdev)
pci_free_consistent(priv->pdev, 4, priv->cookie, priv->cookie_dma);
pci_iounmap(pdev, priv->regs);
+ pci_iounmap(pdev, priv->sram);
pci_set_drvdata(pdev, NULL);
ieee80211_free_hw(hw);
pci_release_regions(pdev);
--
1.5.6.4
^ permalink raw reply related
* [PATCH 20/28] mwl8k: set ->interface_modes from the driver data
From: Lennert Buytenhek @ 2009-10-22 18:21 UTC (permalink / raw)
To: linux-wireless
As different chip/firmware combinations support different
interface types.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 9c10c88..38d34ae 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -91,6 +91,7 @@ struct mwl8k_device_info {
char *helper_image;
char *fw_image;
struct rxd_ops *rxd_ops;
+ u16 modes;
};
struct mwl8k_rx_queue {
@@ -3015,6 +3016,7 @@ static struct mwl8k_device_info di_8687 = {
.helper_image = "mwl8k/helper_8687.fw",
.fw_image = "mwl8k/fmimage_8687.fw",
.rxd_ops = &rxd_8687_ops,
+ .modes = BIT(NL80211_IFTYPE_STATION),
};
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
@@ -3121,7 +3123,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
hw->queues = MWL8K_TX_QUEUES;
- hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
+ hw->wiphy->interface_modes = priv->device_info->modes;
/* Set rssi and noise values to dBm */
hw->flags |= IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_NOISE_DBM;
--
1.5.6.4
^ permalink raw reply related
* [PATCH 13/28] mwl8k: shorten receive/transmit state variable names
From: Lennert Buytenhek @ 2009-10-22 18:20 UTC (permalink / raw)
To: linux-wireless
To conserve horizontal space.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 194 ++++++++++++++++++++----------------------
1 files changed, 93 insertions(+), 101 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 60b0076..f282550 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -87,30 +87,30 @@ MODULE_DEVICE_TABLE(pci, mwl8k_table);
#define MWL8K_TX_QUEUES 4
struct mwl8k_rx_queue {
- int rx_desc_count;
+ int rxd_count;
/* hw receives here */
- int rx_head;
+ int head;
/* refill descs here */
- int rx_tail;
+ int tail;
- struct mwl8k_rx_desc *rx_desc_area;
- dma_addr_t rx_desc_dma;
- struct sk_buff **rx_skb;
+ struct mwl8k_rx_desc *rxd;
+ dma_addr_t rxd_dma;
+ struct sk_buff **skb;
};
struct mwl8k_tx_queue {
/* hw transmits here */
- int tx_head;
+ int head;
/* sw appends here */
- int tx_tail;
+ int tail;
- struct ieee80211_tx_queue_stats tx_stats;
- struct mwl8k_tx_desc *tx_desc_area;
- dma_addr_t tx_desc_dma;
- struct sk_buff **tx_skb;
+ struct ieee80211_tx_queue_stats stats;
+ struct mwl8k_tx_desc *txd;
+ dma_addr_t txd_dma;
+ struct sk_buff **skb;
};
/* Pointers to the firmware data and meta information about it. */
@@ -737,7 +737,7 @@ struct mwl8k_rx_desc {
__u8 link_quality;
__u8 noise_level;
__le32 pkt_phys_addr;
- __le32 next_rx_desc_phys_addr;
+ __le32 next_rxd_phys_addr;
__le16 qos_control;
__le16 rate_info;
__le32 pad0[4];
@@ -766,42 +766,38 @@ static int mwl8k_rxq_init(struct ieee80211_hw *hw, int index)
int size;
int i;
- rxq->rx_desc_count = 0;
- rxq->rx_head = 0;
- rxq->rx_tail = 0;
+ rxq->rxd_count = 0;
+ rxq->head = 0;
+ rxq->tail = 0;
size = MWL8K_RX_DESCS * sizeof(struct mwl8k_rx_desc);
- rxq->rx_desc_area =
- pci_alloc_consistent(priv->pdev, size, &rxq->rx_desc_dma);
- if (rxq->rx_desc_area == NULL) {
+ rxq->rxd = pci_alloc_consistent(priv->pdev, size, &rxq->rxd_dma);
+ if (rxq->rxd == NULL) {
printk(KERN_ERR "%s: failed to alloc RX descriptors\n",
wiphy_name(hw->wiphy));
return -ENOMEM;
}
- memset(rxq->rx_desc_area, 0, size);
+ memset(rxq->rxd, 0, size);
- rxq->rx_skb = kmalloc(MWL8K_RX_DESCS *
- sizeof(*rxq->rx_skb), GFP_KERNEL);
- if (rxq->rx_skb == NULL) {
+ rxq->skb = kmalloc(MWL8K_RX_DESCS * sizeof(*rxq->skb), GFP_KERNEL);
+ if (rxq->skb == NULL) {
printk(KERN_ERR "%s: failed to alloc RX skbuff list\n",
wiphy_name(hw->wiphy));
- pci_free_consistent(priv->pdev, size,
- rxq->rx_desc_area, rxq->rx_desc_dma);
+ pci_free_consistent(priv->pdev, size, rxq->rxd, rxq->rxd_dma);
return -ENOMEM;
}
- memset(rxq->rx_skb, 0, MWL8K_RX_DESCS * sizeof(*rxq->rx_skb));
+ memset(rxq->skb, 0, MWL8K_RX_DESCS * sizeof(*rxq->skb));
for (i = 0; i < MWL8K_RX_DESCS; i++) {
struct mwl8k_rx_desc *rx_desc;
int nexti;
- rx_desc = rxq->rx_desc_area + i;
+ rx_desc = rxq->rxd + i;
nexti = (i + 1) % MWL8K_RX_DESCS;
- rx_desc->next_rx_desc_phys_addr =
- cpu_to_le32(rxq->rx_desc_dma
- + nexti * sizeof(*rx_desc));
+ rx_desc->next_rxd_phys_addr =
+ cpu_to_le32(rxq->rxd_dma + nexti * sizeof(*rx_desc));
rx_desc->rx_ctrl = MWL8K_RX_CTRL_OWNED_BY_HOST;
}
@@ -815,7 +811,7 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
int refilled;
refilled = 0;
- while (rxq->rx_desc_count < MWL8K_RX_DESCS && limit--) {
+ while (rxq->rxd_count < MWL8K_RX_DESCS && limit--) {
struct sk_buff *skb;
int rx;
@@ -823,19 +819,19 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
if (skb == NULL)
break;
- rxq->rx_desc_count++;
+ rxq->rxd_count++;
- rx = rxq->rx_tail;
- rxq->rx_tail = (rx + 1) % MWL8K_RX_DESCS;
+ rx = rxq->tail;
+ rxq->tail = (rx + 1) % MWL8K_RX_DESCS;
- rxq->rx_desc_area[rx].pkt_phys_addr =
+ rxq->rxd[rx].pkt_phys_addr =
cpu_to_le32(pci_map_single(priv->pdev, skb->data,
MWL8K_RX_MAXSZ, DMA_FROM_DEVICE));
- rxq->rx_desc_area[rx].pkt_len = cpu_to_le16(MWL8K_RX_MAXSZ);
- rxq->rx_skb[rx] = skb;
+ rxq->rxd[rx].pkt_len = cpu_to_le16(MWL8K_RX_MAXSZ);
+ rxq->skb[rx] = skb;
wmb();
- rxq->rx_desc_area[rx].rx_ctrl = 0;
+ rxq->rxd[rx].rx_ctrl = 0;
refilled++;
}
@@ -851,24 +847,24 @@ static void mwl8k_rxq_deinit(struct ieee80211_hw *hw, int index)
int i;
for (i = 0; i < MWL8K_RX_DESCS; i++) {
- if (rxq->rx_skb[i] != NULL) {
+ if (rxq->skb[i] != NULL) {
unsigned long addr;
- addr = le32_to_cpu(rxq->rx_desc_area[i].pkt_phys_addr);
+ addr = le32_to_cpu(rxq->rxd[i].pkt_phys_addr);
pci_unmap_single(priv->pdev, addr, MWL8K_RX_MAXSZ,
PCI_DMA_FROMDEVICE);
- kfree_skb(rxq->rx_skb[i]);
- rxq->rx_skb[i] = NULL;
+ kfree_skb(rxq->skb[i]);
+ rxq->skb[i] = NULL;
}
}
- kfree(rxq->rx_skb);
- rxq->rx_skb = NULL;
+ kfree(rxq->skb);
+ rxq->skb = NULL;
pci_free_consistent(priv->pdev,
MWL8K_RX_DESCS * sizeof(struct mwl8k_rx_desc),
- rxq->rx_desc_area, rxq->rx_desc_dma);
- rxq->rx_desc_area = NULL;
+ rxq->rxd, rxq->rxd_dma);
+ rxq->rxd = NULL;
}
@@ -909,7 +905,7 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
int processed;
processed = 0;
- while (rxq->rx_desc_count && limit--) {
+ while (rxq->rxd_count && limit--) {
struct mwl8k_rx_desc *rx_desc;
struct sk_buff *skb;
struct ieee80211_rx_status status;
@@ -917,18 +913,18 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
struct ieee80211_hdr *wh;
u16 rate_info;
- rx_desc = rxq->rx_desc_area + rxq->rx_head;
+ rx_desc = rxq->rxd + rxq->head;
if (!(rx_desc->rx_ctrl & MWL8K_RX_CTRL_OWNED_BY_HOST))
break;
rmb();
- skb = rxq->rx_skb[rxq->rx_head];
+ skb = rxq->skb[rxq->head];
if (skb == NULL)
break;
- rxq->rx_skb[rxq->rx_head] = NULL;
+ rxq->skb[rxq->head] = NULL;
- rxq->rx_head = (rxq->rx_head + 1) % MWL8K_RX_DESCS;
- rxq->rx_desc_count--;
+ rxq->head = (rxq->head + 1) % MWL8K_RX_DESCS;
+ rxq->rxd_count--;
addr = le32_to_cpu(rx_desc->pkt_phys_addr);
pci_unmap_single(priv->pdev, addr,
@@ -999,7 +995,7 @@ struct mwl8k_tx_desc {
__le32 pkt_phys_addr;
__le16 pkt_len;
__u8 dest_MAC_addr[ETH_ALEN];
- __le32 next_tx_desc_phys_addr;
+ __le32 next_txd_phys_addr;
__le32 reserved;
__le16 rate_info;
__u8 peer_id;
@@ -1015,44 +1011,40 @@ static int mwl8k_txq_init(struct ieee80211_hw *hw, int index)
int size;
int i;
- memset(&txq->tx_stats, 0, sizeof(struct ieee80211_tx_queue_stats));
- txq->tx_stats.limit = MWL8K_TX_DESCS;
- txq->tx_head = 0;
- txq->tx_tail = 0;
+ memset(&txq->stats, 0, sizeof(struct ieee80211_tx_queue_stats));
+ txq->stats.limit = MWL8K_TX_DESCS;
+ txq->head = 0;
+ txq->tail = 0;
size = MWL8K_TX_DESCS * sizeof(struct mwl8k_tx_desc);
- txq->tx_desc_area =
- pci_alloc_consistent(priv->pdev, size, &txq->tx_desc_dma);
- if (txq->tx_desc_area == NULL) {
+ txq->txd = pci_alloc_consistent(priv->pdev, size, &txq->txd_dma);
+ if (txq->txd == NULL) {
printk(KERN_ERR "%s: failed to alloc TX descriptors\n",
wiphy_name(hw->wiphy));
return -ENOMEM;
}
- memset(txq->tx_desc_area, 0, size);
+ memset(txq->txd, 0, size);
- txq->tx_skb = kmalloc(MWL8K_TX_DESCS * sizeof(*txq->tx_skb),
- GFP_KERNEL);
- if (txq->tx_skb == NULL) {
+ txq->skb = kmalloc(MWL8K_TX_DESCS * sizeof(*txq->skb), GFP_KERNEL);
+ if (txq->skb == NULL) {
printk(KERN_ERR "%s: failed to alloc TX skbuff list\n",
wiphy_name(hw->wiphy));
- pci_free_consistent(priv->pdev, size,
- txq->tx_desc_area, txq->tx_desc_dma);
+ pci_free_consistent(priv->pdev, size, txq->txd, txq->txd_dma);
return -ENOMEM;
}
- memset(txq->tx_skb, 0, MWL8K_TX_DESCS * sizeof(*txq->tx_skb));
+ memset(txq->skb, 0, MWL8K_TX_DESCS * sizeof(*txq->skb));
for (i = 0; i < MWL8K_TX_DESCS; i++) {
struct mwl8k_tx_desc *tx_desc;
int nexti;
- tx_desc = txq->tx_desc_area + i;
+ tx_desc = txq->txd + i;
nexti = (i + 1) % MWL8K_TX_DESCS;
tx_desc->status = 0;
- tx_desc->next_tx_desc_phys_addr =
- cpu_to_le32(txq->tx_desc_dma +
- nexti * sizeof(*tx_desc));
+ tx_desc->next_txd_phys_addr =
+ cpu_to_le32(txq->txd_dma + nexti * sizeof(*tx_desc));
}
return 0;
@@ -1088,11 +1080,11 @@ static int mwl8k_scan_tx_ring(struct mwl8k_priv *priv,
for (count = 0; count < MWL8K_TX_QUEUES; count++) {
txq = priv->txq + count;
- txinfo[count].len = txq->tx_stats.len;
- txinfo[count].head = txq->tx_head;
- txinfo[count].tail = txq->tx_tail;
+ txinfo[count].len = txq->stats.len;
+ txinfo[count].head = txq->head;
+ txinfo[count].tail = txq->tail;
for (desc = 0; desc < MWL8K_TX_DESCS; desc++) {
- tx_desc = txq->tx_desc_area + desc;
+ tx_desc = txq->txd + desc;
status = le32_to_cpu(tx_desc->status);
if (status & MWL8K_TXD_STATUS_FW_OWNED)
@@ -1173,7 +1165,7 @@ static void mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int force)
struct mwl8k_tx_queue *txq = priv->txq + index;
int wake = 0;
- while (txq->tx_stats.len > 0) {
+ while (txq->stats.len > 0) {
int tx;
struct mwl8k_tx_desc *tx_desc;
unsigned long addr;
@@ -1182,8 +1174,8 @@ static void mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int force)
struct ieee80211_tx_info *info;
u32 status;
- tx = txq->tx_head;
- tx_desc = txq->tx_desc_area + tx;
+ tx = txq->head;
+ tx_desc = txq->txd + tx;
status = le32_to_cpu(tx_desc->status);
@@ -1194,15 +1186,15 @@ static void mwl8k_txq_reclaim(struct ieee80211_hw *hw, int index, int force)
~cpu_to_le32(MWL8K_TXD_STATUS_FW_OWNED);
}
- txq->tx_head = (tx + 1) % MWL8K_TX_DESCS;
- BUG_ON(txq->tx_stats.len == 0);
- txq->tx_stats.len--;
+ txq->head = (tx + 1) % MWL8K_TX_DESCS;
+ BUG_ON(txq->stats.len == 0);
+ txq->stats.len--;
priv->pending_tx_pkts--;
addr = le32_to_cpu(tx_desc->pkt_phys_addr);
size = le16_to_cpu(tx_desc->pkt_len);
- skb = txq->tx_skb[tx];
- txq->tx_skb[tx] = NULL;
+ skb = txq->skb[tx];
+ txq->skb[tx] = NULL;
BUG_ON(skb == NULL);
pci_unmap_single(priv->pdev, addr, size, PCI_DMA_TODEVICE);
@@ -1235,13 +1227,13 @@ static void mwl8k_txq_deinit(struct ieee80211_hw *hw, int index)
mwl8k_txq_reclaim(hw, index, 1);
- kfree(txq->tx_skb);
- txq->tx_skb = NULL;
+ kfree(txq->skb);
+ txq->skb = NULL;
pci_free_consistent(priv->pdev,
MWL8K_TX_DESCS * sizeof(struct mwl8k_tx_desc),
- txq->tx_desc_area, txq->tx_desc_dma);
- txq->tx_desc_area = NULL;
+ txq->txd, txq->txd_dma);
+ txq->txd = NULL;
}
static int
@@ -1318,10 +1310,10 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
txq = priv->txq + index;
- BUG_ON(txq->tx_skb[txq->tx_tail] != NULL);
- txq->tx_skb[txq->tx_tail] = skb;
+ BUG_ON(txq->skb[txq->tail] != NULL);
+ txq->skb[txq->tail] = skb;
- tx = txq->tx_desc_area + txq->tx_tail;
+ tx = txq->txd + txq->tail;
tx->data_rate = txdatarate;
tx->tx_priority = index;
tx->qos_control = cpu_to_le16(qos);
@@ -1332,15 +1324,15 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
wmb();
tx->status = cpu_to_le32(MWL8K_TXD_STATUS_FW_OWNED | txstatus);
- txq->tx_stats.count++;
- txq->tx_stats.len++;
+ txq->stats.count++;
+ txq->stats.len++;
priv->pending_tx_pkts++;
- txq->tx_tail++;
- if (txq->tx_tail == MWL8K_TX_DESCS)
- txq->tx_tail = 0;
+ txq->tail++;
+ if (txq->tail == MWL8K_TX_DESCS)
+ txq->tail = 0;
- if (txq->tx_head == txq->tx_tail)
+ if (txq->head == txq->tail)
ieee80211_stop_queue(hw, index);
mwl8k_tx_start(priv);
@@ -1491,7 +1483,7 @@ struct mwl8k_cmd_get_hw_spec {
__le32 tx_queue_ptrs[MWL8K_TX_QUEUES];
__le32 caps2;
__le32 num_tx_desc_per_queue;
- __le32 total_rx_desc;
+ __le32 total_rxd;
} __attribute__((packed));
static int mwl8k_cmd_get_hw_spec(struct ieee80211_hw *hw)
@@ -1510,12 +1502,12 @@ static int mwl8k_cmd_get_hw_spec(struct ieee80211_hw *hw)
memset(cmd->perm_addr, 0xff, sizeof(cmd->perm_addr));
cmd->ps_cookie = cpu_to_le32(priv->cookie_dma);
- cmd->rx_queue_ptr = cpu_to_le32(priv->rxq[0].rx_desc_dma);
+ cmd->rx_queue_ptr = cpu_to_le32(priv->rxq[0].rxd_dma);
cmd->num_tx_queues = cpu_to_le32(MWL8K_TX_QUEUES);
for (i = 0; i < MWL8K_TX_QUEUES; i++)
- cmd->tx_queue_ptrs[i] = cpu_to_le32(priv->txq[i].tx_desc_dma);
+ cmd->tx_queue_ptrs[i] = cpu_to_le32(priv->txq[i].txd_dma);
cmd->num_tx_desc_per_queue = cpu_to_le32(MWL8K_TX_DESCS);
- cmd->total_rx_desc = cpu_to_le32(MWL8K_RX_DESCS);
+ cmd->total_rxd = cpu_to_le32(MWL8K_RX_DESCS);
rc = mwl8k_post_cmd(hw, &cmd->header);
@@ -2887,7 +2879,7 @@ static int mwl8k_get_tx_stats(struct ieee80211_hw *hw,
spin_lock_bh(&priv->tx_lock);
for (index = 0; index < MWL8K_TX_QUEUES; index++) {
txq = priv->txq + index;
- memcpy(&stats[index], &txq->tx_stats,
+ memcpy(&stats[index], &txq->stats,
sizeof(struct ieee80211_tx_queue_stats));
}
spin_unlock_bh(&priv->tx_lock);
--
1.5.6.4
^ permalink raw reply related
* [PATCH 16/28] mwl8k: spell out the names of firmware images in the pci driver data
From: Lennert Buytenhek @ 2009-10-22 18:20 UTC (permalink / raw)
To: linux-wireless
To allow use of a more flexible firmware file naming scheme.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 43 +++++++++++++++++++++--------------------
1 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 49edd0c..37b3f31 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -80,7 +80,9 @@
#define MWL8K_TX_QUEUES 4
struct mwl8k_device_info {
- int part_num;
+ char *part_name;
+ char *helper_image;
+ char *fw_image;
};
struct mwl8k_rx_queue {
@@ -112,11 +114,11 @@ struct mwl8k_tx_queue {
/* Pointers to the firmware data and meta information about it. */
struct mwl8k_firmware {
- /* Microcode */
- struct firmware *ucode;
-
/* Boot helper code */
struct firmware *helper;
+
+ /* Microcode */
+ struct firmware *ucode;
};
struct mwl8k_priv {
@@ -355,26 +357,23 @@ static int mwl8k_request_fw(struct mwl8k_priv *priv,
static int mwl8k_request_firmware(struct mwl8k_priv *priv)
{
- u8 filename[64];
+ struct mwl8k_device_info *di = priv->device_info;
int rc;
- snprintf(filename, sizeof(filename),
- "mwl8k/helper_%u.fw", priv->device_info->part_num);
-
- rc = mwl8k_request_fw(priv, filename, &priv->fw.helper);
- if (rc) {
- printk(KERN_ERR "%s: Error requesting helper firmware "
- "file %s\n", pci_name(priv->pdev), filename);
- return rc;
+ if (di->helper_image != NULL) {
+ rc = mwl8k_request_fw(priv, di->helper_image, &priv->fw.helper);
+ if (rc) {
+ printk(KERN_ERR "%s: Error requesting helper "
+ "firmware file %s\n", pci_name(priv->pdev),
+ di->helper_image);
+ return rc;
+ }
}
- snprintf(filename, sizeof(filename),
- "mwl8k/fmimage_%u.fw", priv->device_info->part_num);
-
- rc = mwl8k_request_fw(priv, filename, &priv->fw.ucode);
+ rc = mwl8k_request_fw(priv, di->fw_image, &priv->fw.ucode);
if (rc) {
printk(KERN_ERR "%s: Error requesting firmware file %s\n",
- pci_name(priv->pdev), filename);
+ pci_name(priv->pdev), di->fw_image);
mwl8k_release_fw(&priv->fw.helper);
return rc;
}
@@ -2937,7 +2936,9 @@ static void mwl8k_finalize_join_worker(struct work_struct *work)
}
static struct mwl8k_device_info di_8687 = {
- .part_num = 8687,
+ .part_name = "88w8687",
+ .helper_image = "mwl8k/helper_8687.fw",
+ .fw_image = "mwl8k/fmimage_8687.fw",
};
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
@@ -3163,8 +3164,8 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
goto err_stop_firmware;
}
- printk(KERN_INFO "%s: 88w%u v%d, %pM, firmware version %u.%u.%u.%u\n",
- wiphy_name(hw->wiphy), priv->device_info->part_num,
+ printk(KERN_INFO "%s: %s v%d, %pM, firmware version %u.%u.%u.%u\n",
+ wiphy_name(hw->wiphy), priv->device_info->part_name,
priv->hw_rev, hw->wiphy->perm_addr,
(priv->fw_rev >> 24) & 0xff, (priv->fw_rev >> 16) & 0xff,
(priv->fw_rev >> 8) & 0xff, priv->fw_rev & 0xff);
--
1.5.6.4
^ permalink raw reply related
* [PATCH 26/28] mwl8k: add AP firmware (mbss) handling to mwl8k_set_mac_addr()
From: Lennert Buytenhek @ 2009-10-22 18:21 UTC (permalink / raw)
To: linux-wireless
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index b2c68b2..4eda6f9 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -2134,11 +2134,18 @@ static int mwl8k_enable_sniffer(struct ieee80211_hw *hw, bool enable)
*/
struct mwl8k_cmd_set_mac_addr {
struct mwl8k_cmd_pkt header;
- __u8 mac_addr[ETH_ALEN];
+ union {
+ struct {
+ __le16 mac_type;
+ __u8 mac_addr[ETH_ALEN];
+ } mbss;
+ __u8 mac_addr[ETH_ALEN];
+ };
} __attribute__((packed));
static int mwl8k_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
{
+ struct mwl8k_priv *priv = hw->priv;
struct mwl8k_cmd_set_mac_addr *cmd;
int rc;
@@ -2148,7 +2155,12 @@ static int mwl8k_set_mac_addr(struct ieee80211_hw *hw, u8 *mac)
cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_MAC_ADDR);
cmd->header.length = cpu_to_le16(sizeof(*cmd));
- memcpy(cmd->mac_addr, mac, ETH_ALEN);
+ if (priv->ap_fw) {
+ cmd->mbss.mac_type = 0;
+ memcpy(cmd->mbss.mac_addr, mac, ETH_ALEN);
+ } else {
+ memcpy(cmd->mac_addr, mac, ETH_ALEN);
+ }
rc = mwl8k_post_cmd(hw, &cmd->header);
kfree(cmd);
--
1.5.6.4
^ permalink raw reply related
* [PATCH 21/28] mwl8k: rename mwl8k_cmd_get_hw_spec() to mwl8k_cmd_get_hw_spec_sta()
From: Lennert Buytenhek @ 2009-10-22 18:21 UTC (permalink / raw)
To: linux-wireless
As the AP version of the command uses a different format.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 38d34ae..5ccea17 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1537,9 +1537,9 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
}
/*
- * GET_HW_SPEC.
+ * CMD_GET_HW_SPEC (STA version).
*/
-struct mwl8k_cmd_get_hw_spec {
+struct mwl8k_cmd_get_hw_spec_sta {
struct mwl8k_cmd_pkt header;
__u8 hw_rev;
__u8 host_interface;
@@ -1558,10 +1558,10 @@ struct mwl8k_cmd_get_hw_spec {
__le32 total_rxd;
} __attribute__((packed));
-static int mwl8k_cmd_get_hw_spec(struct ieee80211_hw *hw)
+static int mwl8k_cmd_get_hw_spec_sta(struct ieee80211_hw *hw)
{
struct mwl8k_priv *priv = hw->priv;
- struct mwl8k_cmd_get_hw_spec *cmd;
+ struct mwl8k_cmd_get_hw_spec_sta *cmd;
int rc;
int i;
@@ -3210,7 +3210,7 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
iowrite32(MWL8K_A2H_EVENTS, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
/* Get config data, mac addrs etc */
- rc = mwl8k_cmd_get_hw_spec(hw);
+ rc = mwl8k_cmd_get_hw_spec_sta(hw);
if (rc) {
printk(KERN_ERR "%s: Cannot initialise firmware\n",
wiphy_name(hw->wiphy));
--
1.5.6.4
^ permalink raw reply related
* [PATCH 22/28] mwl8k: add the commands used for AP firmware initialisation
From: Lennert Buytenhek @ 2009-10-22 18:21 UTC (permalink / raw)
To: linux-wireless
Add the AP version of the GET_HW_SPEC command, as well as the
SET_HW_SPEC command, for initialising AP firmware.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/wireless/mwl8k.c | 133 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 132 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 5ccea17..4a70ce1 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -274,6 +274,7 @@ static const struct ieee80211_rate mwl8k_rates[] = {
/* Firmware command codes */
#define MWL8K_CMD_CODE_DNLD 0x0001
#define MWL8K_CMD_GET_HW_SPEC 0x0003
+#define MWL8K_CMD_SET_HW_SPEC 0x0004
#define MWL8K_CMD_MAC_MULTICAST_ADR 0x0010
#define MWL8K_CMD_GET_STAT 0x0014
#define MWL8K_CMD_RADIO_CONTROL 0x001c
@@ -304,6 +305,7 @@ static const char *mwl8k_cmd_name(u16 cmd, char *buf, int bufsize)
switch (cmd & ~0x8000) {
MWL8K_CMDNAME(CODE_DNLD);
MWL8K_CMDNAME(GET_HW_SPEC);
+ MWL8K_CMDNAME(SET_HW_SPEC);
MWL8K_CMDNAME(MAC_MULTICAST_ADR);
MWL8K_CMDNAME(GET_STAT);
MWL8K_CMDNAME(RADIO_CONTROL);
@@ -1595,6 +1597,129 @@ static int mwl8k_cmd_get_hw_spec_sta(struct ieee80211_hw *hw)
}
/*
+ * CMD_GET_HW_SPEC (AP version).
+ */
+struct mwl8k_cmd_get_hw_spec_ap {
+ struct mwl8k_cmd_pkt header;
+ __u8 hw_rev;
+ __u8 host_interface;
+ __le16 num_wcb;
+ __le16 num_mcaddrs;
+ __u8 perm_addr[ETH_ALEN];
+ __le16 region_code;
+ __le16 num_antenna;
+ __le32 fw_rev;
+ __le32 wcbbase0;
+ __le32 rxwrptr;
+ __le32 rxrdptr;
+ __le32 ps_cookie;
+ __le32 wcbbase1;
+ __le32 wcbbase2;
+ __le32 wcbbase3;
+} __attribute__((packed));
+
+static int mwl8k_cmd_get_hw_spec_ap(struct ieee80211_hw *hw)
+{
+ struct mwl8k_priv *priv = hw->priv;
+ struct mwl8k_cmd_get_hw_spec_ap *cmd;
+ int rc;
+
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
+ if (cmd == NULL)
+ return -ENOMEM;
+
+ cmd->header.code = cpu_to_le16(MWL8K_CMD_GET_HW_SPEC);
+ cmd->header.length = cpu_to_le16(sizeof(*cmd));
+
+ memset(cmd->perm_addr, 0xff, sizeof(cmd->perm_addr));
+ cmd->ps_cookie = cpu_to_le32(priv->cookie_dma);
+
+ rc = mwl8k_post_cmd(hw, &cmd->header);
+
+ if (!rc) {
+ int off;
+
+ SET_IEEE80211_PERM_ADDR(hw, cmd->perm_addr);
+ priv->num_mcaddrs = le16_to_cpu(cmd->num_mcaddrs);
+ priv->fw_rev = le32_to_cpu(cmd->fw_rev);
+ priv->hw_rev = cmd->hw_rev;
+
+ off = le32_to_cpu(cmd->wcbbase0) & 0xffff;
+ iowrite32(cpu_to_le32(priv->txq[0].txd_dma), priv->sram + off);
+
+ off = le32_to_cpu(cmd->rxwrptr) & 0xffff;
+ iowrite32(cpu_to_le32(priv->rxq[0].rxd_dma), priv->sram + off);
+
+ off = le32_to_cpu(cmd->rxrdptr) & 0xffff;
+ iowrite32(cpu_to_le32(priv->rxq[0].rxd_dma), priv->sram + off);
+
+ off = le32_to_cpu(cmd->wcbbase1) & 0xffff;
+ iowrite32(cpu_to_le32(priv->txq[1].txd_dma), priv->sram + off);
+
+ off = le32_to_cpu(cmd->wcbbase2) & 0xffff;
+ iowrite32(cpu_to_le32(priv->txq[2].txd_dma), priv->sram + off);
+
+ off = le32_to_cpu(cmd->wcbbase3) & 0xffff;
+ iowrite32(cpu_to_le32(priv->txq[3].txd_dma), priv->sram + off);
+ }
+
+ kfree(cmd);
+ return rc;
+}
+
+/*
+ * CMD_SET_HW_SPEC.
+ */
+struct mwl8k_cmd_set_hw_spec {
+ struct mwl8k_cmd_pkt header;
+ __u8 hw_rev;
+ __u8 host_interface;
+ __le16 num_mcaddrs;
+ __u8 perm_addr[ETH_ALEN];
+ __le16 region_code;
+ __le32 fw_rev;
+ __le32 ps_cookie;
+ __le32 caps;
+ __le32 rx_queue_ptr;
+ __le32 num_tx_queues;
+ __le32 tx_queue_ptrs[MWL8K_TX_QUEUES];
+ __le32 flags;
+ __le32 num_tx_desc_per_queue;
+ __le32 total_rxd;
+} __attribute__((packed));
+
+#define MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT 0x00000080
+
+static int mwl8k_cmd_set_hw_spec(struct ieee80211_hw *hw)
+{
+ struct mwl8k_priv *priv = hw->priv;
+ struct mwl8k_cmd_set_hw_spec *cmd;
+ int rc;
+ int i;
+
+ cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
+ if (cmd == NULL)
+ return -ENOMEM;
+
+ cmd->header.code = cpu_to_le16(MWL8K_CMD_SET_HW_SPEC);
+ cmd->header.length = cpu_to_le16(sizeof(*cmd));
+
+ cmd->ps_cookie = cpu_to_le32(priv->cookie_dma);
+ cmd->rx_queue_ptr = cpu_to_le32(priv->rxq[0].rxd_dma);
+ cmd->num_tx_queues = cpu_to_le32(MWL8K_TX_QUEUES);
+ for (i = 0; i < MWL8K_TX_QUEUES; i++)
+ cmd->tx_queue_ptrs[i] = cpu_to_le32(priv->txq[i].txd_dma);
+ cmd->flags = cpu_to_le32(MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT);
+ cmd->num_tx_desc_per_queue = cpu_to_le32(MWL8K_TX_DESCS);
+ cmd->total_rxd = cpu_to_le32(MWL8K_RX_DESCS);
+
+ rc = mwl8k_post_cmd(hw, &cmd->header);
+ kfree(cmd);
+
+ return rc;
+}
+
+/*
* CMD_MAC_MULTICAST_ADR.
*/
struct mwl8k_cmd_mac_multicast_adr {
@@ -3210,7 +3335,13 @@ static int __devinit mwl8k_probe(struct pci_dev *pdev,
iowrite32(MWL8K_A2H_EVENTS, priv->regs + MWL8K_HIU_A2H_INTERRUPT_MASK);
/* Get config data, mac addrs etc */
- rc = mwl8k_cmd_get_hw_spec_sta(hw);
+ if (priv->ap_fw) {
+ rc = mwl8k_cmd_get_hw_spec_ap(hw);
+ if (!rc)
+ rc = mwl8k_cmd_set_hw_spec(hw);
+ } else {
+ rc = mwl8k_cmd_get_hw_spec_sta(hw);
+ }
if (rc) {
printk(KERN_ERR "%s: Cannot initialise firmware\n",
wiphy_name(hw->wiphy));
--
1.5.6.4
^ permalink raw reply related
* Fwd: [Bug 300794] Installation of WiFi Cards w firmware fails
From: Dr. Axel Braun @ 2009-10-22 20:46 UTC (permalink / raw)
To: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
Gents,
for some reason there are uncertainties about the license of the p54 firmware
for the prism chips, which stop the openSUSE project for the moment to ship
the firmware.
Can you clarify the license question?
Thanks
Axel
--
Dr.-Ing. Axel K. Braun
Mobile: +49.173.7003.154
VoIP/Skype: axxite
PGP Fingerprint: CB03 964D 1CFA E87B AA63 53F3 1BD6 F53A EB48 EF22
Public Key available at http://www.axxite.com/axel.braun@gmx.de.asc
This mail was *not scanned* before sending.
It was sended from a secure Linux desktop.
[-- Attachment #2: bugzilla_noreply@novell.com: [Bug 300794] Installation of WiFi Cards w firmware fails --]
[-- Type: message/rfc822, Size: 2609 bytes --]
From: bugzilla_noreply@novell.com
To: axel.braun@gmx.de
Subject: [Bug 300794] Installation of WiFi Cards w firmware fails
Date: Thu, 22 Oct 2009 11:58:25 -0600
Message-ID: <20091022175826.0057DCC7CD@soval.provo.novell.com>
http://bugzilla.novell.com/show_bug.cgi?id=300794
User vbotka@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=300794#c25
Vladimir Botka <vbotka@novell.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |CLOSED
Version|Milestone 3 |RC 1
Resolution| |WONTFIX
--- Comment #25 from Vladimir Botka <vbotka@novell.com> 2009-10-22 11:58:17 MDT ---
I am going to close this issue as WONTFIX.
The license of the firmware [1] [2] is not very clear. If I ask for fate it
will land by me for evaluation anyway. If you can point me to the clear license
reopen.
[1] http://wireless.kernel.org/en/users/Drivers/p54#p54
[2] http://daemonizer.de/prism54/prism54-fw/
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You reported the bug.
^ permalink raw reply
* Re: NOHZ: local_softirq_pending 08
From: Tilman Schmidt @ 2009-10-22 23:37 UTC (permalink / raw)
To: Jarek Poplawski
Cc: David Miller, johannes, hidave.darkstar, linux-kernel, tglx,
linux-wireless, linux-ppp, netdev, paulus, isdn4linux,
i4ldeveloper, Karsten Keil
In-Reply-To: <4ADF5710.4030505@imap.cc>
[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]
On 21.10.2009 20:46, /me wrote:
>>>> I have encountered the message in the subject during a test of
>>>> the Gigaset CAPI driver, and would like to determine whether
>>>> it's a bug in the driver, a bug somewhere else, or no bug at
>>>> all. The test scenario was PPP over ISDN with pppd+capiplugin.
>>>> In an alternative scenario, also PPP over ISDN but with
>>>> smpppd+capidrv, the message did not occur.
>
> I'm sorry, I had confused the two cases. The message occurs in
> the smpppd+capidrv scenario, not with pppd+capiplugin.
>
>>>> Johannes' answer pointed me to the netif_rx() function.
>>>> The Gigaset driver itself doesn't call that function at all.
>>>> In the scenario where I saw the message, it was the SYNC_PPP
>>>> line discipline that did.
>
> This analysis was therefore wrong. It would be the netif_rx()
> call towards the end of isdn_ppp_push_higher() in
> drivers/isdn/i4l/isdn_ppp.c L1177.
Having noticed that, I cooked up the following patch which fixed
the messages for me. Comments? (Adding i4l people to the already
impressive CC list.)
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -1174,7 +1174,10 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff
#endif /* CONFIG_IPPP_FILTER */
skb->dev = dev;
skb_reset_mac_header(skb);
- netif_rx(skb);
+ if (in_interrupt())
+ netif_rx(skb);
+ else
+ netif_rx_ni(skb);
/* net_dev->local->stats.rx_packets++; done in isdn_net.c */
return;
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
^ permalink raw reply
* Re: [ath9k-devel] mac80211/ath9k/hostapd: Some clients unable to associate with AP
From: Will Dyson @ 2009-10-22 23:45 UTC (permalink / raw)
To: Jouni Malinen
Cc: Björn Smedman, ath9k-devel, linux-wireless, Joerg Pommnitz
In-Reply-To: <20091022161021.GA5532@jm.kir.nu>
[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]
Jouni Malinen wrote:
> Would you be able to send me a wireless capture log (i.e., the binary
> file with all the frames, not such a text dump of some information)
> showing the frames exchanged in the failure and success cases? I would
> be especially interested in seeing the Beacon frames which were not
> shown in your previous message. I'm currently traveling and cannot
> easily try to reproduce this before returning home.
I also have an ath9k-based OpenWrt router, and see the same issue when
running the latest builds.
I've reproduced the problem with the very latest svn (which uses
compat-wireless 2009-10-09 and kernel 2.6.30.8) and the tree as of
2009-06-20 (which uses compat-wirless 2009-06-02 and a local patch to
use kernel 2.6.30). Both have hostapd 0.6.9.
The router's MAC is 00:90:cc:f4:9b:98.
The client is an IPW2200 (linux driver from 2.6.28) with MAC 00:12:f0:74:ae:f9
There is a WPA2-PSK passphrase of "testpass" set.
Attached are the complete binary dumps, fail.pcap and win.pcap.
Interestingly, Linux 2.6.32-rc5 with a rt61 pci card crashes with a
BUG_ON() when I try to associate with the bad version.
kernel BUG at net/mac80211/agg-rx.c:90!
invalid opcode: 0000 [#1] PREEMPT SMP
I've recompiled with debug info turned and will follow up to the
appropriate mailing list next time I am ready to crash my workstation
:p
--
Will Dyson
[-- Attachment #2: fail.pcap.gz --]
[-- Type: application/x-gzip, Size: 25075 bytes --]
[-- Attachment #3: win.pcap.gz --]
[-- Type: application/x-gzip, Size: 33907 bytes --]
^ permalink raw reply
* Re: [ath9k-devel] mac80211/ath9k/hostapd: Some clients unable to associate with AP
From: Jouni Malinen @ 2009-10-23 0:43 UTC (permalink / raw)
To: Will Dyson
Cc: Björn Smedman, ath9k-devel, linux-wireless, Joerg Pommnitz
In-Reply-To: <8e6f94720910221645n2b0b1edcq29358f175a41d3ad@mail.gmail.com>
On Thu, Oct 22, 2009 at 07:45:29PM -0400, Will Dyson wrote:
> I also have an ath9k-based OpenWrt router, and see the same issue when
> running the latest builds.
>
> I've reproduced the problem with the very latest svn (which uses
> compat-wireless 2009-10-09 and kernel 2.6.30.8) and the tree as of
> 2009-06-20 (which uses compat-wirless 2009-06-02 and a local patch to
> use kernel 2.6.30). Both have hostapd 0.6.9.
> Attached are the complete binary dumps, fail.pcap and win.pcap.
Thanks! This seems to confirm that the issue is indeed related to the
sequence number on the frames not being set correctly (for other than
Beacon frames).
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply
* Re: [PATCH] cfg80211: sme: deauthenticate on assoc failure
From: Jouni Malinen @ 2009-10-23 4:07 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless, Luis R. Rodriguez
In-Reply-To: <1256018933.4475.6.camel@johannes.local>
On Tue, Oct 20, 2009 at 03:08:53PM +0900, Johannes Berg wrote:
> When the in-kernel SME gets an association failure from
> the AP we don't deauthenticate, and thus get into a very
> confused state which will lead to warnings later on. Fix
> this by actually deauthenticating when the AP indicates
> an association failure.
While this may be a reasonable change to resolve an issue now, this may
not be the best long term solution. There are some association failure
cases which should really be handled by trying association again instead
of deauthenticating. The main example would be the association comeback
time use in IEEE 802.11w. In general, association failure should not
result in deauthentication in every case.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply
* b43: add 'struct b43_wl' missing declaration
From: Albert Herranz @ 2009-10-23 5:03 UTC (permalink / raw)
To: Larry.Finger, linville; +Cc: bcm43xx-dev, linux-wireless, mb, mboton
Hi,
The patch "b43: add 'struct b43_wl' missing declaration" [1], which was already acked by Michael, is still needed to fix a bunch of the following GCC warnings when CONFIG_B43_LEDS is not selected:
drivers/net/wireless/b43/leds.h:79: warning: 'struct b43_wl' declared inside parameter list
drivers/net/wireless/b43/leds.h:79: warning: its scope is only this definition or declaration, which is probably not what you want
The warnings were introduced by commit "b43: Don't use struct wldev after detach." [2].
Thanks,
Albert
[1] http://marc.info/?l=linux-kernel&m=125509895406307
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=727c988593271599c9e5943699426afcce1a62d6;hp=a4d63a943735efa30270ce70716d43323fd40f02
^ permalink raw reply
* mac80211 scan & mlme delay
From: Lam Yoke Khei @ 2009-10-23 7:23 UTC (permalink / raw)
To: linux-wireless
Hi,
1. I would like to get advice whether the delay value defined in mac80211
scan.c (IEEE80211_PROBE_DELAY, IEEE80211_CHANNEL_TIME,
IEEEE80211_PASSIVE_CHANNEL_TIME) and mlme.c (IEEE80211_AUTH_TIMEOUT,
IEEE80211_ASSOC_TIMEOUT, IEEE80211_MONITORING_INTERVAL,
IEEE80211_RETRY_AUTH_INTERVAL) can be reduced?
2. What baseline is followed to fix the delay value?
3. Can I say the the delay value increases packet loss during
re-authentication/re-association?
4. From mac80211 point of view, what causes packet loss during
re-authentication/re-association?
Thank you and with best regards,
Lam
^ permalink raw reply
* Re: [ath9k-devel] mac80211/ath9k/hostapd: Some clients unable to associate with AP
From: Joerg Pommnitz @ 2009-10-23 9:15 UTC (permalink / raw)
To: Will Dyson, Jouni Malinen; +Cc: Björn Smedman, ath9k-devel, linux-wireless
In-Reply-To: <8e6f94720910221645n2b0b1edcq29358f175a41d3ad@mail.gmail.com>
Since Jouni has confirmed my suspicion about the invalid sequence number I will refrain from spamming the list with tcpdumps.
Will, thanks for bringing me into the loop of this discussion!
--
Regards
Joerg
^ permalink raw reply
* Re: ath5k AP kernel panic when client uses SCP
From: Tomasz Chmielewski @ 2009-10-23 13:15 UTC (permalink / raw)
To: linux-wireless, linux-netdev, linux-mips, Bob Copeland
In-Reply-To: <4AD21AB4.6010208@wpkg.org>
Bob Copeland wrote:
>
> CONFIG_DEBUG_INFO is the basic switch. I don't know if MIPS needs
> CONFIG_FRAME_POINTER but that could help too.
I don't see CONFIG_FRAME_POINTER available.
I compiled with CONFIG_DEBUG_INFO; let me know if I should enable some
other DEBUG options as well (see below what's enabled and available).
Before it oopses, I see lots of order 0 page allocation failures (there
are some extra spaces at the end of each line due to the broken konsole
in KDE4):
http://www1.wpkg.org/oops2.txt
Once, the device hanged without producing an oops (with lots of page
allocation failures before).
No clue about disassembling here, sorry.
# zgrep DEBUG /proc/config.gz
# CONFIG_PCI_DEBUG is not set
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_NETFILTER_XT_MATCH_LAYER7_DEBUG is not set
CONFIG_CFG80211_REG_DEBUG=y
# CONFIG_CFG80211_DEBUGFS is not set
CONFIG_LIB80211_DEBUG=y
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_MTD_DEBUG is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_DM_DEBUG is not set
CONFIG_LIBERTAS_DEBUG=y
CONFIG_ATH5K_DEBUG=y
CONFIG_ATH9K_DEBUG=y
CONFIG_IPW2100_DEBUG=y
CONFIG_IPW2200_DEBUG=y
CONFIG_LIBIPW_DEBUG=y
CONFIG_IWLWIFI_DEBUG=y
CONFIG_B43_DEBUG=y
CONFIG_B43LEGACY_DEBUG=y
CONFIG_ZD1211RW_DEBUG=y
CONFIG_RT2X00_DEBUG=y
# CONFIG_HISAX_DEBUG is not set
# CONFIG_SSB_DEBUG is not set
# CONFIG_USB_DEBUG is not set
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_SERIAL_DEBUG is not set
# CONFIG_JBD_DEBUG is not set
# CONFIG_JBD2_DEBUG is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_XFS_DEBUG is not set
# CONFIG_NTFS_DEBUG is not set
CONFIG_JFFS2_FS_DEBUG=0
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SHIRQ=y
CONFIG_SCHED_DEBUG=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
# CONFIG_DEBUG_MEMORY_INIT is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_RUNTIME_DEBUG is not set
> Another option in the absence of debug info is disassembling the
> Code: section of the oops and trying to find the corresponding
> code via objdump, but this only really works well if you have some
> idea which module is causing the error.
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply
* Re: ath5k AP kernel panic when client uses SCP
From: Gábor Stefanik @ 2009-10-23 13:21 UTC (permalink / raw)
To: Tomasz Chmielewski; +Cc: linux-wireless, linux-netdev, linux-mips, Bob Copeland
In-Reply-To: <4AE1AC69.7010904@wpkg.org>
On Fri, Oct 23, 2009 at 3:15 PM, Tomasz Chmielewski <mangoo@wpkg.org> wrote:
> Bob Copeland wrote:
>>
>> CONFIG_DEBUG_INFO is the basic switch. I don't know if MIPS needs
>> CONFIG_FRAME_POINTER but that could help too.
>
> I don't see CONFIG_FRAME_POINTER available.
> I compiled with CONFIG_DEBUG_INFO; let me know if I should enable some other
> DEBUG options as well (see below what's enabled and available).
>
> Before it oopses, I see lots of order 0 page allocation failures (there are
> some extra spaces at the end of each line due to the broken konsole in
> KDE4):
>
> http://www1.wpkg.org/oops2.txt
>
>
> Once, the device hanged without producing an oops (with lots of page
> allocation failures before).
>
>
> No clue about disassembling here, sorry.
>
>
> # zgrep DEBUG /proc/config.gz
>
> # CONFIG_PCI_DEBUG is not set
> # CONFIG_NETFILTER_DEBUG is not set
> # CONFIG_NETFILTER_XT_MATCH_LAYER7_DEBUG is not set
> CONFIG_CFG80211_REG_DEBUG=y
> # CONFIG_CFG80211_DEBUGFS is not set
> CONFIG_LIB80211_DEBUG=y
> # CONFIG_MAC80211_DEBUGFS is not set
> # CONFIG_MAC80211_DEBUG_MENU is not set
> # CONFIG_DEBUG_DRIVER is not set
> # CONFIG_DEBUG_DEVRES is not set
> # CONFIG_MTD_DEBUG is not set
> # CONFIG_SCSI_DEBUG is not set
> # CONFIG_DM_DEBUG is not set
> CONFIG_LIBERTAS_DEBUG=y
> CONFIG_ATH5K_DEBUG=y
> CONFIG_ATH9K_DEBUG=y
> CONFIG_IPW2100_DEBUG=y
> CONFIG_IPW2200_DEBUG=y
> CONFIG_LIBIPW_DEBUG=y
> CONFIG_IWLWIFI_DEBUG=y
> CONFIG_B43_DEBUG=y
> CONFIG_B43LEGACY_DEBUG=y
> CONFIG_ZD1211RW_DEBUG=y
> CONFIG_RT2X00_DEBUG=y
> # CONFIG_HISAX_DEBUG is not set
> # CONFIG_SSB_DEBUG is not set
> # CONFIG_USB_DEBUG is not set
> # CONFIG_USB_STORAGE_DEBUG is not set
> # CONFIG_USB_SERIAL_DEBUG is not set
> # CONFIG_JBD_DEBUG is not set
> # CONFIG_JBD2_DEBUG is not set
> # CONFIG_JFS_DEBUG is not set
> # CONFIG_XFS_DEBUG is not set
> # CONFIG_NTFS_DEBUG is not set
> CONFIG_JFFS2_FS_DEBUG=0
> # CONFIG_CIFS_DEBUG2 is not set
> CONFIG_DEBUG_FS=y
> CONFIG_DEBUG_KERNEL=y
> CONFIG_DEBUG_SHIRQ=y
> CONFIG_SCHED_DEBUG=y
> # CONFIG_DEBUG_OBJECTS is not set
> # CONFIG_DEBUG_SLAB is not set
> # CONFIG_DEBUG_RT_MUTEXES is not set
> # CONFIG_DEBUG_SPINLOCK is not set
> # CONFIG_DEBUG_MUTEXES is not set
> # CONFIG_DEBUG_LOCK_ALLOC is not set
> # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
> # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
> # CONFIG_DEBUG_KOBJECT is not set
> CONFIG_DEBUG_INFO=y
> # CONFIG_DEBUG_VM is not set
> # CONFIG_DEBUG_WRITECOUNT is not set
> # CONFIG_DEBUG_MEMORY_INIT is not set
> # CONFIG_DEBUG_LIST is not set
> # CONFIG_DEBUG_SG is not set
> # CONFIG_DEBUG_NOTIFIERS is not set
> # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
> # CONFIG_DYNAMIC_DEBUG is not set
> # CONFIG_DEBUG_STACK_USAGE is not set
> # CONFIG_RUNTIME_DEBUG is not set
>
>
>> Another option in the absence of debug info is disassembling the
>> Code: section of the oops and trying to find the corresponding
>> code via objdump, but this only really works well if you have some
>> idea which module is causing the error.
>
>
>
> --
> Tomasz Chmielewski
> http://wpkg.org
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Is CONFIG_KALLSYMS set?
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply
* Re: ath5k AP kernel panic when client uses SCP
From: Tomasz Chmielewski @ 2009-10-23 13:24 UTC (permalink / raw)
To: Gábor Stefanik; +Cc: linux-wireless, linux-net, linux-mips, Bob Copeland
In-Reply-To: <69e28c910910230621j2176813dpe7f77b7dff5b1b44@mail.gmail.com>
Gábor Stefanik wrote:
> On Fri, Oct 23, 2009 at 3:15 PM, Tomasz Chmielewski <mangoo@wpkg.org> wrote:
>> Bob Copeland wrote:
>>> CONFIG_DEBUG_INFO is the basic switch. I don't know if MIPS needs
>>> CONFIG_FRAME_POINTER but that could help too.
>> I don't see CONFIG_FRAME_POINTER available.
>> I compiled with CONFIG_DEBUG_INFO; let me know if I should enable some other
>> DEBUG options as well (see below what's enabled and available).
>>
>> Before it oopses, I see lots of order 0 page allocation failures (there are
>> some extra spaces at the end of each line due to the broken konsole in
>> KDE4):
>>
>> http://www1.wpkg.org/oops2.txt
> Is CONFIG_KALLSYMS set?
Good clue:
# zgrep KALL /proc/config.gz
# CONFIG_KALLSYMS is not set
I'll recompile...
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply
* Re: [RFC] libertas: monster-patch to make CFG/WEXT configurable
From: Johannes Berg @ 2009-10-22 8:31 UTC (permalink / raw)
To: Holger Schurig; +Cc: linux-wireless, Dan Williams
In-Reply-To: <200910200835.35747.hs4233@mail.mn-solutions.de>
[-- Attachment #1: Type: text/plain, Size: 1826 bytes --]
On Tue, 2009-10-20 at 08:35 +0200, Holger Schurig wrote:
> > I really don't understand the point. Can't you just use the
> > cfg80211 hooks and keep both functional at the same time? Just
> > like orinoco does it uses cfg80211 only partially.
>
> I think I can't do this in a sane way.
I don't see why not.
> Oh, and please don't compare libertas all the time with orinoco.
> Orinoco is FULLMAC, libertas is HALFMAC.
>
> Because libertas firmware doesn't roam, it has to be done in
> software. Libertas does this in assoc.c, partly in scan.c, cmd.c
> and wext.c and even main.c. For example, libertas keeps its own
> list of BSS entries, has code to select the best matching BSS
> when it comes to associating ... things like this.
None of this code is relevant to mesh.
> cfg80211 has this code too.
No, it has no roaming etc.
> Having two competing implementations running in one driver is a
> way to havoc.
I'm not saying you should keep the old _station_ code, I'm just saying
you should hook it up in a way that doesn't make it exclusive with mesh.
> I can't and won't do the MESH stuff: I don't have a firmware that
> does MESH, no knowledge and usage case for MESH. It would,
> however, be possible to keep the current mesh code with WEXT and
> use cfg80211 for monitor/station mode. However, I dislike this
> more than cfg80211/wext configurability.
I'm not saying you should do mesh. I'm saying that instead of ripping
out _all_ wext code you should just redirect/rewrite the wext handlers
and call the cfg80211 ones, so that for _managed_ mode you get the new
stuff, but for _mesh_ mode you keep the old code.
Otherwise you're not doing the driver any good at all, since your patch
then just means that both versions need to be maintained.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH] net: Adjust softirq raising in __napi_schedule
From: Johannes Berg @ 2009-10-22 8:27 UTC (permalink / raw)
To: Jarek Poplawski
Cc: Tilman Schmidt, David Miller, hidave.darkstar, linux-kernel, tglx,
linux-wireless, linux-ppp, netdev, paulus, Michael Buesch,
Oliver Hartkopp
In-Reply-To: <20091021213947.GA12202@ami.dom.local>
[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]
On Wed, 2009-10-21 at 23:39 +0200, Jarek Poplawski wrote:
> > > - __raise_softirq_irqoff(NET_RX_SOFTIRQ);
> > > + raise_softirq_irqoff(NET_RX_SOFTIRQ);
> >
> > This still doesn't make any sense.
> >
> > There may or may not be a lot of code that assumes that everything else
> > is run with other tasklets disabled, and that it cannot be interrupted
> > by a tasklet and thus create a race.
> >
> > Can you prove that is not the case, across the entire networking layer?
>
> I'm not sure I can understand your question. This patch is mainly to
> avoid using netif_rx()/netif_rx_ni() pair as a test of proper process
> context handling; IMHO there're better tools for this (lockdep,
> WARN_ON's).
And how exactly does that matter to the patch at hand?!
I'm saying that it seems to me, as indicated by the API (and without
proof otherwise that's how it is) the networking layer needs to have
packets handed to it with softirqs disabled. Therefore, this patch is
not needed. While it may not be _wrong_, it'll definitely introduce a
performance regression.
This really should be obvious. You're fixing the warning at the source
of the warning, rather than the source of the problem.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: 2.6.32-rc5-git1 -- INFO: possible circular locking dependency detected
From: Johannes Berg @ 2009-10-22 8:34 UTC (permalink / raw)
To: Miles Lane; +Cc: LKML, linux-wireless, Holger Schurig, Alan Jenkins
In-Reply-To: <4ADDBD2A.7070807@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1741 bytes --]
On Tue, 2009-10-20 at 09:37 -0400, Miles Lane wrote:
> Resending with wrapping off and time info removed:
Hey, thanks for that!
> [ INFO: possible circular locking dependency detected ]
> 2.6.32-rc5-git1 #1
> -------------------------------------------------------
> events/0/9 is trying to acquire lock:
> (&rfkill->sync_work){+.+.+.}, at: [<c1039083>]
> __cancel_work_timer+0x81/0x181
>
> but task is already holding lock:
> (&ehotk->hotplug_lock){+.+.+.}, at: [<f8587708>]
> eeepc_rfkill_hotplug+0x45/0xda [eeepc_laptop]
>
> which lock already depends on the new lock.
>
>
> the existing dependency chain (in reverse order) is:
>
> -> #2 (&ehotk->hotplug_lock){+.+.+.}:
> [<c129e5ee>] mutex_lock_nested+0x2b/0x33
> [<f8587708>] eeepc_rfkill_hotplug+0x45/0xda [eeepc_laptop]
> [<f858787c>] eeepc_rfkill_set+0x1d/0x2d [eeepc_laptop]
> [<f83f4a9f>] rfkill_set_block+0x6f/0xb1 [rfkill]
> [<f83f4b78>] __rfkill_switch_all+0x2e/0x51 [rfkill]
> [<f83f4c12>] rfkill_switch_all+0x33/0x41 [rfkill]
> [<f83f51b0>] rfkill_op_handler+0xf0/0x11e [rfkill]
> [<c1038965>] worker_thread+0x161/0x233
> [<c103b883>] kthread+0x5f/0x64
> [<c1003613>] kernel_thread_helper+0x7/0x10
>
> -> #1 (rfkill_global_mutex){+.+.+.}:
> [<c104ac60>] __lock_acquire+0x9fb/0xb6d
> [<c104ae2e>] lock_acquire+0x5c/0x73
> [<c129e223>] __mutex_lock_common+0x39/0x375
> [<c129e5ee>] mutex_lock_nested+0x2b/0x33
> [<f83f4c36>] rfkill_sync_work+0x16/0x35 [rfkill]
Hmm. It seems eeepc takes the hotplug lock in the set path, but also
elsewhere? Seems like a bug in eeepc, Alan?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox