2012-11-09 19:42:12

by Johannes Berg

[permalink] [raw]
Subject: pull-request: mac80211 2012-11-09

John,

Here are five more fixes from me for 3.7. There's no theme to them, just
various changes all over mac80211, see the commit logs for more
information.

Please pull, information below.

johannes


The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832:

mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john

for you to fetch changes up to 20f544eea03db4b498942558b882d463ce575c3e:

mac80211: don't send null data packet when not associated (2012-11-09 17:31:47 +0100)

----------------------------------------------------------------
Arik Nemtsov (1):
mac80211: sync acccess to tx_filtered/ps_tx_buf queues

David Spinadel (1):
mac80211: init sched_scan_ies

Felix Fietkau (1):
mac80211: do not call ieee80211_configure_filter if no interfaces are up

Johannes Berg (2):
mac80211: fix memory leak in device registration error path
mac80211: don't send null data packet when not associated

net/mac80211/cfg.c | 3 +++
net/mac80211/main.c | 6 ++++--
net/mac80211/scan.c | 2 +-
net/mac80211/sta_info.c | 5 +++++
net/mac80211/util.c | 2 ++
5 files changed, 15 insertions(+), 3 deletions(-)


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2012-11-14 19:31:19

by John W. Linville

[permalink] [raw]
Subject: Re: pull-request: mac80211 2012-11-12

On Mon, Nov 12, 2012 at 04:27:41PM +0100, Johannes Berg wrote:
> On Mon, 2012-11-12 at 10:01 +0100, Johannes Berg wrote:
> > Another day, updated pull request. I'm going to let you merge this one,
> > even if somebody sends me new fixes right now :)
> >
> > I have a locking fix for some SKB queues, a variable initialization to
> > avoid crashes in a certain failure case, another free_txskb fix from
> > Felix and another fix from him to avoid calling a stopped driver, a fix
> > for a (very unlikely) memory leak and a fix to not send null data
> > packets when resuming while not associated.
>
> I've amended the branch again, with the regulatory fix. Sorry about
> that!
>
> johannes

I pulled this one... :-)

> The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832:
>
> mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john
>
> for you to fetch changes up to 43c771a1963ab461a2f194e3c97fded1d5fe262f:
>
> wireless: allow 40 MHz on world roaming channels 12/13 (2012-11-12 16:26:06 +0100)
>
> ----------------------------------------------------------------
> Arik Nemtsov (1):
> mac80211: sync acccess to tx_filtered/ps_tx_buf queues
>
> David Spinadel (1):
> mac80211: init sched_scan_ies
>
> Felix Fietkau (2):
> mac80211: do not call ieee80211_configure_filter if no interfaces are up
> mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge
>
> Johannes Berg (3):
> mac80211: fix memory leak in device registration error path
> mac80211: don't send null data packet when not associated
> wireless: allow 40 MHz on world roaming channels 12/13
>
> net/mac80211/cfg.c | 3 +++
> net/mac80211/ieee80211_i.h | 2 ++
> net/mac80211/main.c | 6 ++++--
> net/mac80211/scan.c | 2 +-
> net/mac80211/sta_info.c | 11 ++++++++---
> net/mac80211/status.c | 9 +++++++++
> net/mac80211/tx.c | 9 ++++++---
> net/mac80211/util.c | 2 ++
> net/wireless/reg.c | 5 ++---
> 9 files changed, 37 insertions(+), 12 deletions(-)
>



--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2012-11-12 15:27:10

by Johannes Berg

[permalink] [raw]
Subject: Re: pull-request: mac80211 2012-11-12

On Mon, 2012-11-12 at 10:01 +0100, Johannes Berg wrote:
> Another day, updated pull request. I'm going to let you merge this one,
> even if somebody sends me new fixes right now :)
>
> I have a locking fix for some SKB queues, a variable initialization to
> avoid crashes in a certain failure case, another free_txskb fix from
> Felix and another fix from him to avoid calling a stopped driver, a fix
> for a (very unlikely) memory leak and a fix to not send null data
> packets when resuming while not associated.

I've amended the branch again, with the regulatory fix. Sorry about
that!

johannes

The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832:

mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john

for you to fetch changes up to 43c771a1963ab461a2f194e3c97fded1d5fe262f:

wireless: allow 40 MHz on world roaming channels 12/13 (2012-11-12 16:26:06 +0100)

----------------------------------------------------------------
Arik Nemtsov (1):
mac80211: sync acccess to tx_filtered/ps_tx_buf queues

David Spinadel (1):
mac80211: init sched_scan_ies

Felix Fietkau (2):
mac80211: do not call ieee80211_configure_filter if no interfaces are up
mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge

Johannes Berg (3):
mac80211: fix memory leak in device registration error path
mac80211: don't send null data packet when not associated
wireless: allow 40 MHz on world roaming channels 12/13

net/mac80211/cfg.c | 3 +++
net/mac80211/ieee80211_i.h | 2 ++
net/mac80211/main.c | 6 ++++--
net/mac80211/scan.c | 2 +-
net/mac80211/sta_info.c | 11 ++++++++---
net/mac80211/status.c | 9 +++++++++
net/mac80211/tx.c | 9 ++++++---
net/mac80211/util.c | 2 ++
net/wireless/reg.c | 5 ++---
9 files changed, 37 insertions(+), 12 deletions(-)


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2012-11-09 19:49:10

by Johannes Berg

[permalink] [raw]
Subject: [PATCH 2/2] iwlwifi: use ieee80211_free_txskb

From: Johannes Berg <[email protected]>

To let mac80211 clean up any TX information when
a frame is dropped, use ieee80211_free_txskb().

Reviewed-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/dvm/mac80211.c | 2 +-
drivers/net/wireless/iwlwifi/dvm/main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index ff8162d..fa4d1b8 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -521,7 +521,7 @@ static void iwlagn_mac_tx(struct ieee80211_hw *hw,
ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);

if (iwlagn_tx_skb(priv, control->sta, skb))
- dev_kfree_skb_any(skb);
+ ieee80211_free_txskb(hw, skb);
}

static void iwlagn_mac_update_tkip_key(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index 7ff3f14..408132c 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -2114,7 +2114,7 @@ static void iwl_free_skb(struct iwl_op_mode *op_mode, struct sk_buff *skb)

info = IEEE80211_SKB_CB(skb);
iwl_trans_free_tx_cmd(priv->trans, info->driver_data[1]);
- dev_kfree_skb_any(skb);
+ ieee80211_free_txskb(priv->hw, skb);
}

static void iwl_set_hw_rfkill_state(struct iwl_op_mode *op_mode, bool state)
--
1.8.0


2012-11-09 19:49:10

by Johannes Berg

[permalink] [raw]
Subject: [PATCH 1/2] iwlwifi: handle DMA mapping failures

From: Johannes Berg <[email protected]>

The RX replenish code doesn't handle DMA mapping failures,
which will cause issues if there actually is a failure. This
was reported by Shuah Khan who found a DMA mapping framework
warning ("device driver failed to check map error").

Cc: [email protected]
Reported-by: Shuah Khan <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/pcie/rx.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c
index 17c8e5d..bb69f8f 100644
--- a/drivers/net/wireless/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c
@@ -321,6 +321,14 @@ static void iwl_rx_allocate(struct iwl_trans *trans, gfp_t priority)
dma_map_page(trans->dev, page, 0,
PAGE_SIZE << trans_pcie->rx_page_order,
DMA_FROM_DEVICE);
+ if (dma_mapping_error(trans->dev, rxb->page_dma)) {
+ rxb->page = NULL;
+ spin_lock_irqsave(&rxq->lock, flags);
+ list_add(&rxb->list, &rxq->rx_used);
+ spin_unlock_irqrestore(&rxq->lock, flags);
+ __free_pages(page, trans_pcie->rx_page_order);
+ return;
+ }
/* dma address must be no more than 36 bits */
BUG_ON(rxb->page_dma & ~DMA_BIT_MASK(36));
/* and also 256 byte aligned! */
@@ -488,8 +496,19 @@ static void iwl_rx_handle_rxbuf(struct iwl_trans *trans,
dma_map_page(trans->dev, rxb->page, 0,
PAGE_SIZE << trans_pcie->rx_page_order,
DMA_FROM_DEVICE);
- list_add_tail(&rxb->list, &rxq->rx_free);
- rxq->free_count++;
+ if (dma_mapping_error(trans->dev, rxb->page_dma)) {
+ /*
+ * free the page(s) as well to not break
+ * the invariant that the items on the used
+ * list have no page(s)
+ */
+ __free_pages(rxb->page, trans_pcie->rx_page_order);
+ rxb->page = NULL;
+ list_add_tail(&rxb->list, &rxq->rx_used);
+ } else {
+ list_add_tail(&rxb->list, &rxq->rx_free);
+ rxq->free_count++;
+ }
} else
list_add_tail(&rxb->list, &rxq->rx_used);
spin_unlock_irqrestore(&rxq->lock, flags);
--
1.8.0


2012-11-09 19:49:57

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/2] iwlwifi: handle DMA mapping failures

Err, ok, copy/paste bug -- I meant to have these as replies to the
*iwlwifi* pull request, not the *mac80211* one. Sorry about that!

johannes


2012-11-12 09:01:10

by Johannes Berg

[permalink] [raw]
Subject: pull-request: mac80211 2012-11-12

Another day, updated pull request. I'm going to let you merge this one,
even if somebody sends me new fixes right now :)

I have a locking fix for some SKB queues, a variable initialization to
avoid crashes in a certain failure case, another free_txskb fix from
Felix and another fix from him to avoid calling a stopped driver, a fix
for a (very unlikely) memory leak and a fix to not send null data
packets when resuming while not associated.

Please pull, the entire pull request is below.

johannes


The following changes since commit 6dbda2d00d466225f9db1dc695ff852443f28832:

mac80211: make sure data is accessible in EAPOL check (2012-10-26 22:52:42 +0200)

are available in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john

for you to fetch changes up to 1f98ab7fef48a2968f37f422c256c9fbd978c3f0:

mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge (2012-11-10 21:26:28 +0100)

----------------------------------------------------------------
Arik Nemtsov (1):
mac80211: sync acccess to tx_filtered/ps_tx_buf queues

David Spinadel (1):
mac80211: init sched_scan_ies

Felix Fietkau (2):
mac80211: do not call ieee80211_configure_filter if no interfaces are up
mac80211: call skb_dequeue/ieee80211_free_txskb instead of __skb_queue_purge

Johannes Berg (2):
mac80211: fix memory leak in device registration error path
mac80211: don't send null data packet when not associated

net/mac80211/cfg.c | 3 +++
net/mac80211/ieee80211_i.h | 2 ++
net/mac80211/main.c | 6 ++++--
net/mac80211/scan.c | 2 +-
net/mac80211/sta_info.c | 11 ++++++++---
net/mac80211/status.c | 9 +++++++++
net/mac80211/tx.c | 9 ++++++---
net/mac80211/util.c | 2 ++
8 files changed, 35 insertions(+), 9 deletions(-)


Attachments:
signature.asc (801.00 B)
This is a digitally signed message part

2012-11-10 07:53:25

by Johannes Berg

[permalink] [raw]
Subject: Re: pull-request: mac80211 2012-11-09

On Fri, 2012-11-09 at 20:42 +0100, Johannes Berg wrote:
> John,
>
> Here are five more fixes from me for 3.7. There's no theme to them, just
> various changes all over mac80211, see the commit logs for more
> information.

Hmm, Felix has another txskb fix, I'll send a new pull request on
Monday, please ignore this one.

johannes