Skip to contentSkip to conversation

pull-request: mac80211-next 2012-07-10

DISCUSSION Johannes Berg 1 participant 7 messages Jul 10, 2012 – Jul 12, 2012 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

John,

Please pull some more patches. I've included the first round of API additions/updates for the P2P Device abstraction, I don't know if we'll get the actual code done in time for 3.6 but I didn't want to hang on to these APIs for too long to avoid conflicts.

I've also included some more fixes for the multi-channel and 60GHz work as well as a few other fixes.

Thanks,
johannes

The following changes since commit 4d6d0ae2a088e1e054ef6d96ceb1b41523291e71:

mac80211_hwsim: add testmode code to stop/wake queues (2012-07-06 15:27:15 +0200)

are available in the git repository at:

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

for you to fetch changes up to a9f9f43341bc5c8d2bd2ef8034fdd1789d5e0b19:

cfg80211: fix locking and lockdep complaints (2012-07-10 19:40:34 +0200)

----------------------------------------------------------------
Arik Nemtsov (1):
mac80211: fix invalid band deref building preq IEs

Christian Lamparter (1):
mac80211: request TX status for BlockAck Requests

Johannes Berg (18):
mac80211: update BSS info on AC parameters change
mac80211: remove unused assignment
mac80211: remove ieee80211_key_removed
nl80211: prepare for non-netdev wireless devs
nl80211: add NL80211_FLAG_NEED_WDEV
nl80211: retrieve interface data by wdev
nl80211: don't assume wdev->netdev exists
cfg80211: use wdev in mgmt-tx/ROC APIs
cfg80211: use wireless_dev for interface management
nl80211: send interface after creation
nl80211: move scan API to wdev
mac80211: make scan_sdata pointer usable with RCU
mac80211: track scheduled scan virtual interface
mac80211: redesign scan RX
mac80211: optimize ieee80211_rx_status struct layout
mac80211: add time synchronisation with BSS for assoc
mac80211: restructure key selection
cfg80211: fix locking and lockdep complaints

Nicolas Cavallari (1):
mac80211: tx: do not drop non-robust mgmt to non-MFP stas.

Sylvain Roger Rieunier (1):
minstrel_ht: enable frame aggregation for fixed rate

Vladimir Kondratiev (1):
cfg80211: fix oops due to unassigned set_monitor_enabled callback

 Documentation/DocBook/80211.tmpl                   |    1 -
 drivers/net/wireless/ath/ath6kl/cfg80211.c         |   58 +--
 drivers/net/wireless/ath/ath6kl/cfg80211.h         |    6 +-
 drivers/net/wireless/ath/ath6kl/core.c             |    8 +-
 drivers/net/wireless/ath/ath6kl/core.h             |    5 +
 drivers/net/wireless/ath/ath6kl/wmi.c              |   10 +-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |    3 +-
 drivers/net/wireless/iwlegacy/common.c             |    2 +-
 drivers/net/wireless/iwlwifi/dvm/rxon.c            |    2 +-
 drivers/net/wireless/iwmc3200wifi/cfg80211.c       |    3 +-
 drivers/net/wireless/libertas/cfg.c                |    1 -
 drivers/net/wireless/mwifiex/cfg80211.c            |   27 +-
 drivers/net/wireless/mwifiex/main.c                |    4 +-
 drivers/net/wireless/mwifiex/main.h                |   10 +-
 drivers/net/wireless/orinoco/cfg.c                 |    2 +-
 drivers/net/wireless/rndis_wlan.c                  |    5 +-
 drivers/net/wireless/rt2x00/rt2x00config.c         |    2 +-
 include/linux/nl80211.h                            |    5 +
 include/net/cfg80211.h                             |   75 ++--
 include/net/mac80211.h                             |   40 +--
 net/mac80211/agg-tx.c                              |    3 +-
 net/mac80211/cfg.c                                 |   48 +--
 net/mac80211/debugfs.c                             |    2 -
 net/mac80211/ieee80211_i.h                         |   20 +-
 net/mac80211/iface.c                               |   15 +-
 net/mac80211/key.c                                 |   20 --
 net/mac80211/main.c                                |    3 +-
 net/mac80211/mlme.c                                |   45 +--
 net/mac80211/offchannel.c                          |    6 +-
 net/mac80211/rc80211_minstrel_ht.c                 |    8 +-
 net/mac80211/rx.c                                  |   49 +--
 net/mac80211/scan.c                                |  116 +++---
 net/mac80211/status.c                              |    9 +-
 net/mac80211/trace.h                               |    6 +-
 net/mac80211/tx.c                                  |   25 +-
 net/mac80211/util.c                                |    2 +
 net/wireless/chan.c                                |    4 +-
 net/wireless/core.c                                |   27 +-
 net/wireless/core.h                                |   11 +-
 net/wireless/mlme.c                                |   34 +-
 net/wireless/nl80211.c                             |  373 ++++++++++++++------
 net/wireless/nl80211.h                             |   16 +-
 net/wireless/scan.c                                |   24 +-
 net/wireless/sme.c                                 |   10 +-
 net/wireless/util.c                                |   17 +-
 45 files changed, 657 insertions(+), 505 deletions(-)
author maintainer
#1 lore raw
Quoted 6 lines · Johannes Berg

John,

Please pull some more patches. I've included the first round of API additions/updates for the P2P Device abstraction, I don't know if we'll get the actual code done in time for 3.6 but I didn't want to hang on to these APIs for too long to avoid conflicts.

Ugh, I found a bug with this, please drop, I'll respin. Sorry!

johannes

author maintainer
#2 lore raw
Quoted 9 lines · Johannes Berg
Quoted 6 lines · Johannes Berg

John,

Please pull some more patches. I've included the first round of API additions/updates for the P2P Device abstraction, I don't know if we'll get the actual code done in time for 3.6 but I didn't want to hang on to these APIs for too long to avoid conflicts.

Ugh, I found a bug with this, please drop, I'll respin. Sorry!

Ok the bug is this -- if we remove a wdev (that doesn't have a netdev), this change is obviously needed:

net/wireless/nl80211.c +3 -4
index 27cd18e..70452aa 100644
@@ -6768,6 +6768,7 @@ static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb,
 			info->user_ptr[1] = dev;
 		} else {
 			info->user_ptr[1] = wdev;
+			info->user_ptr[2] = wdev->netdev;
 		}
 
 		if (dev) {
@@ -6799,10 +6800,8 @@ static void nl80211_post_doit(struct genl_ops *ops, struct sk_buff *skb,
 		cfg80211_unlock_rdev(info->user_ptr[0]);
 	if (info->user_ptr[1]) {
 		if (ops->internal_flags & NL80211_FLAG_NEED_WDEV) {
-			struct wireless_dev *wdev = info->user_ptr[1];
-
-			if (wdev->netdev)
-				dev_put(wdev->netdev);
+			if (info->user_ptr[2])
+				dev_put(info->user_ptr[2]);
 		} else {
 			dev_put(info->user_ptr[1]);
 		}

I've rolled it into the patch that introduced the bug ("nl80211: add NL80211_FLAG_NEED_WDEV") and will send a new pull request. Obviously, I'm therefore rebasing my tree.

Sorry for the inconvenience!

johannes

author maintainer
#3 lore raw
Quoted 20 lines · Johannes Berg
Quoted 9 lines · Johannes Berg
Quoted 6 lines · Johannes Berg

John,

Please pull some more patches. I've included the first round of API additions/updates for the P2P Device abstraction, I don't know if we'll get the actual code done in time for 3.6 but I didn't want to hang on to these APIs for too long to avoid conflicts.

Ugh, I found a bug with this, please drop, I'll respin. Sorry!

Ok the bug is this -- if we remove a wdev (that doesn't have a netdev), this change is obviously needed:

net/wireless/nl80211.c +0 -0
index 27cd18e..70452aa 100644

net/wireless/nl80211.c static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb, · line 6771

Quoted 4 lines
net/wireless/nl80211.c +1 -0
@@ -6768,6 +6768,7 @@ static int nl80211_pre_doit(struct genl_ops *ops, struct sk_buff *skb,
 			info->user_ptr[1] = dev;
 		} else {
 			info->user_ptr[1] = wdev;
+			info->user_ptr[2] = wdev->netdev;

Ok, it's not that simple, ouch! The user_ptr[] array only has two entries!

johannes

author maintainer
#4 lore raw
Quoted 2 lines · Johannes Berg
Quoted 2 lines

Ok the bug is this -- if we remove a wdev (that doesn't have a netdev), this change is obviously needed:

Better just handle the special case, I'm rolling this into the patch "cfg80211: use wireless_dev for interface management":

net/wireless/nl80211.c +10 -0
@@ -2030,6 +2030,16 @@ static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info)
 	if (!rdev->ops->del_virtual_intf)
 		return -EOPNOTSUPP;
 
+	/*
+	 * If we remove a wireless device without a netdev then clear
+	 * user_ptr[1] so that nl80211_post_doit won't dereference it
+	 * to check if it needs to do dev_put(). Otherwise it crashes
+	 * since the wdev has been freed, unlike with a netdev where
+	 * we need the dev_put() for the netdev to really be freed.
+	 */
+	if (!wdev->netdev)
+		info->user_ptr[1] = NULL;
+
 	return rdev->ops->del_virtual_intf(&rdev->wiphy, wdev);
 }
 

johannes

author maintainer
#5 lore raw

pull-request: mac80211-next 2012-07-12

In reply to Johannes Berg

John,

Here's a fixed pull request, please take this version. I've included the fixed version of the API additions/updates for the P2P Device abstraction, I still don't know if we'll get the actual code done in time for 3.6 but I didn't want to hang on to these APIs for too long to avoid conflicts.

I've also included some more fixes for the multi-channel and 60GHz work as well as a few other fixes.

The "iterate monitor interfaces patch" is new over the previous version of the pull request.

Thanks,
Johannes

The following changes since commit 4d6d0ae2a088e1e054ef6d96ceb1b41523291e71:

mac80211_hwsim: add testmode code to stop/wake queues (2012-07-06 15:27:15 +0200)

are available in the git repository at:

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

for you to fetch changes up to 685fb72b63faf09a767cc28332545f5830b91be8:

mac80211: iterate the virtual monitor interface (2012-07-12 12:10:50 +0200)

----------------------------------------------------------------
Arik Nemtsov (1):
mac80211: fix invalid band deref building preq IEs

Christian Lamparter (1):
mac80211: request TX status for BlockAck Requests

Johannes Berg (19):
mac80211: update BSS info on AC parameters change
mac80211: remove unused assignment
mac80211: remove ieee80211_key_removed
nl80211: prepare for non-netdev wireless devs
nl80211: add NL80211_FLAG_NEED_WDEV
nl80211: retrieve interface data by wdev
nl80211: don't assume wdev->netdev exists
cfg80211: use wdev in mgmt-tx/ROC APIs
cfg80211: use wireless_dev for interface management
nl80211: send interface after creation
nl80211: move scan API to wdev
mac80211: make scan_sdata pointer usable with RCU
mac80211: track scheduled scan virtual interface
mac80211: redesign scan RX
mac80211: optimize ieee80211_rx_status struct layout
mac80211: add time synchronisation with BSS for assoc
mac80211: restructure key selection
cfg80211: fix locking and lockdep complaints
mac80211: iterate the virtual monitor interface

Nicolas Cavallari (1):
mac80211: tx: do not drop non-robust mgmt to non-MFP stas.

Sylvain Roger Rieunier (1):
minstrel_ht: enable frame aggregation for fixed rate

Vladimir Kondratiev (1):
cfg80211: fix oops due to unassigned set_monitor_enabled callback

 Documentation/DocBook/80211.tmpl                   |    1 -
 drivers/net/wireless/ath/ath6kl/cfg80211.c         |   58 +--
 drivers/net/wireless/ath/ath6kl/cfg80211.h         |    6 +-
 drivers/net/wireless/ath/ath6kl/core.c             |    8 +-
 drivers/net/wireless/ath/ath6kl/core.h             |    5 +
 drivers/net/wireless/ath/ath6kl/wmi.c              |   10 +-
 .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c  |    3 +-
 drivers/net/wireless/iwlegacy/common.c             |    2 +-
 drivers/net/wireless/iwlwifi/dvm/rxon.c            |    2 +-
 drivers/net/wireless/iwmc3200wifi/cfg80211.c       |    3 +-
 drivers/net/wireless/libertas/cfg.c                |    1 -
 drivers/net/wireless/mwifiex/cfg80211.c            |   27 +-
 drivers/net/wireless/mwifiex/main.c                |    4 +-
 drivers/net/wireless/mwifiex/main.h                |   10 +-
 drivers/net/wireless/orinoco/cfg.c                 |    2 +-
 drivers/net/wireless/rndis_wlan.c                  |    5 +-
 drivers/net/wireless/rt2x00/rt2x00config.c         |    2 +-
 include/linux/nl80211.h                            |    5 +
 include/net/cfg80211.h                             |   75 ++--
 include/net/mac80211.h                             |   40 +-
 net/mac80211/agg-tx.c                              |    3 +-
 net/mac80211/cfg.c                                 |   48 +--
 net/mac80211/debugfs.c                             |    2 -
 net/mac80211/ieee80211_i.h                         |   20 +-
 net/mac80211/iface.c                               |   44 ++-
 net/mac80211/key.c                                 |   20 -
 net/mac80211/main.c                                |    3 +-
 net/mac80211/mlme.c                                |   45 +--
 net/mac80211/offchannel.c                          |    6 +-
 net/mac80211/rc80211_minstrel_ht.c                 |    8 +-
 net/mac80211/rx.c                                  |   49 +--
 net/mac80211/scan.c                                |  116 +++---
 net/mac80211/status.c                              |    9 +-
 net/mac80211/trace.h                               |    6 +-
 net/mac80211/tx.c                                  |   25 +-
 net/mac80211/util.c                                |   11 +
 net/wireless/chan.c                                |    4 +-
 net/wireless/core.c                                |   27 +-
 net/wireless/core.h                                |   11 +-
 net/wireless/mlme.c                                |   34 +-
 net/wireless/nl80211.c                             |  383 ++++++++++++++------
 net/wireless/nl80211.h                             |   16 +-
 net/wireless/scan.c                                |   24 +-
 net/wireless/sme.c                                 |   10 +-
 net/wireless/util.c                                |   17 +-
 45 files changed, 695 insertions(+), 515 deletions(-)
author maintainer
#6 lore raw

Re: pull-request: mac80211-next 2012-07-12

Quoted 17 lines · Johannes Berg

John,

Here's a fixed pull request, please take this version. I've included the fixed version of the API additions/updates for the P2P Device abstraction, I still don't know if we'll get the actual code done in time for 3.6 but I didn't want to hang on to these APIs for too long to avoid conflicts.

I've also included some more fixes for the multi-channel and 60GHz work as well as a few other fixes.

The "iterate monitor interfaces patch" is new over the previous version of the pull request.

Thanks,
Johannes

Quoted 7 lines

The following changes since commit 4d6d0ae2a088e1e054ef6d96ceb1b41523291e71:

mac80211_hwsim: add testmode code to stop/wake queues (2012-07-06 15:27:15 +0200)

are available in the git repository at:

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

Hmm. This doesn't call out the "for-john" branch for some reason? Not sure why that happened.

johannes