Re: [PATCH 4/6] d80211: don't display name of invisible network device

2007-02-01 Thread Jiri Benc
On Wed, 31 Jan 2007 19:58:58 +0100, Johannes Berg wrote:
 Well, that's a bug indeed, but the cure isn't don't allow any qos
 operations but rather don't allow removal of the 802.11 qdisc.

This solution can be described as don't allow 802.11 qdisc
customization for now, introduce that as a new feature later when
qdiscs and netdev are not tied together.

It solves several problems by stripping down just one feature (which
hardly anybody uses now and which is not working properly anyway) which
will be reintroduced later. Quite feasible I would say given the fact
that userspace-visible master network interface is perceived as a merge
blocker by some people.

 Jiri

-- 
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/6] d80211: don't display name of invisible network device

2007-02-01 Thread Johannes Berg
On Thu, 2007-02-01 at 16:17 +0100, Jiri Benc wrote:
 On Wed, 31 Jan 2007 19:58:58 +0100, Johannes Berg wrote:
  Well, that's a bug indeed, but the cure isn't don't allow any qos
  operations but rather don't allow removal of the 802.11 qdisc.
 
 This solution can be described as don't allow 802.11 qdisc
 customization for now, introduce that as a new feature later when
 qdiscs and netdev are not tied together.

Ok, that makes sense.

 It solves several problems by stripping down just one feature (which
 hardly anybody uses now and which is not working properly anyway) which
 will be reintroduced later. Quite feasible I would say given the fact
 that userspace-visible master network interface is perceived as a merge
 blocker by some people.

Alright. Fine with me :)

johannes


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 4/6] d80211: don't display name of invisible network device

2007-01-31 Thread Johannes Berg
On Tue, 2007-01-30 at 15:00 +0100, Jan Kiszka wrote:

  If the master netdev no longer has a name, how can you still use `tc' on
  it?
 
 I hope you can't,

You know, being able to is the only (user interface) reason for the
master dev's existence.

 because that was recently proven to be able to
 subtly break the stack:
 
 http://www.mail-archive.com/netdev@vger.kernel.org/msg29219.html

Well, that's a bug indeed, but the cure isn't don't allow any qos
operations but rather don't allow removal of the 802.11 qdisc.

johannes


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 4/6] d80211: don't display name of invisible network device

2007-01-30 Thread Johannes Berg
On Mon, 2007-01-29 at 18:48 +0100, Jiri Benc wrote:
 Invisible master interface does not have meaningful name. Display the wiphy
 identifier in kernel messages instead.
 
 Also, remove the allocation of master interface name as it is purposeless
 now.

If the master netdev no longer has a name, how can you still use `tc' on
it?

johannes


signature.asc
Description: This is a digitally signed message part


Re: [PATCH 4/6] d80211: don't display name of invisible network device

2007-01-30 Thread Jan Kiszka

2007/1/30, Johannes Berg [EMAIL PROTECTED]:

On Mon, 2007-01-29 at 18:48 +0100, Jiri Benc wrote:
 Invisible master interface does not have meaningful name. Display the wiphy
 identifier in kernel messages instead.

 Also, remove the allocation of master interface name as it is purposeless
 now.

If the master netdev no longer has a name, how can you still use `tc' on
it?


I hope you can't, because that was recently proven to be able to
subtly break the stack:

http://www.mail-archive.com/netdev@vger.kernel.org/msg29219.html

Jan
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/6] d80211: don't display name of invisible network device

2007-01-29 Thread Jiri Benc
Invisible master interface does not have meaningful name. Display the wiphy
identifier in kernel messages instead.

Also, remove the allocation of master interface name as it is purposeless
now.

Signed-off-by: Jiri Benc [EMAIL PROTECTED]

---
 net/d80211/ieee80211.c  |   98 +---
 net/d80211/ieee80211_scan.c |   28 ++--
 net/d80211/sta_info.c   |   12 ++---
 net/d80211/wme.c|8 ++-
 4 files changed, 74 insertions(+), 72 deletions(-)

--- dscape.orig/net/d80211/ieee80211.c
+++ dscape/net/d80211/ieee80211.c
@@ -284,14 +284,14 @@ int ieee80211_get_hdrlen_from_skb(struct
 EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb);
 
 #ifdef CONFIG_D80211_LOWTX_FRAME_DUMP
-static void ieee80211_dump_frame(const char *ifname, const char *title,
+static void ieee80211_dump_frame(int hwindex, const char *title,
 struct sk_buff *skb)
 {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb-data;
u16 fc;
int hdrlen;
 
-   printk(KERN_DEBUG %s: %s (len=%d), ifname, title, skb-len);
+   printk(KERN_DEBUG wiphy%d: %s (len=%d), hwindex, title, skb-len);
if (skb-len  4) {
printk(\n);
return;
@@ -315,7 +315,7 @@ static void ieee80211_dump_frame(const c
printk(\n);
 }
 #else /* CONFIG_D80211_LOWTX_FRAME_DUMP */
-static inline void ieee80211_dump_frame(const char *ifname, const char *title,
+static inline void ieee80211_dump_frame(int hwindex, const char *title,
struct sk_buff *skb)
 {
 }
@@ -945,8 +945,8 @@ static void purge_old_ps_buffers(struct 
spin_unlock_bh(local-sta_lock);
 
local-total_ps_buffered = total;
-   printk(KERN_DEBUG %s: PS buffers full - purged %d frames\n,
-  local-mdev-name, purged);
+   printk(KERN_DEBUG wiphy%d: PS buffers full - purged %d frames\n,
+  local-hw.index, purged);
 }
 
 
@@ -1147,7 +1147,7 @@ static int __ieee80211_tx(struct ieee802
int ret, i;
 
if (skb) {
-   ieee80211_dump_frame(local-mdev-name, TX to low-level 
driver, skb);
+   ieee80211_dump_frame(local-hw.index, TX to low-level driver, 
skb);
ret = local-ops-tx(local_to_hw(local), skb, control);
if (ret)
return IEEE80211_TX_AGAIN;
@@ -1174,7 +1174,7 @@ static int __ieee80211_tx(struct ieee802

~IEEE80211_TXCTL_RATE_CTRL_PROBE;
}
 
-   ieee80211_dump_frame(local-mdev-name,
+   ieee80211_dump_frame(local-hw.index,
 TX to low-level driver, skb);
ret = local-ops-tx(local_to_hw(local),
tx-u.tx.extra_frag[i],
@@ -1375,8 +1375,10 @@ static int ieee80211_master_start_xmit(s
}
if (unlikely(!odev)) {
 #ifdef CONFIG_D80211_VERBOSE_DEBUG
-   printk(KERN_DEBUG %s: Discarded packet with nonexistent 
-  originating device\n, dev-name);
+   struct ieee80211_local *local = dev-ieee80211_ptr;
+
+   printk(KERN_DEBUG wiphy%d: Discarded packet with nonexistent 
+  originating device\n, local-hw.index);
 #endif
dev_kfree_skb(skb);
return 0;
@@ -1764,8 +1766,8 @@ struct sk_buff * ieee80211_beacon_get(st
rate = rate_control_get_rate(local, local-mdev, skb, extra);
if (!rate) {
if (net_ratelimit()) {
-   printk(KERN_DEBUG %s: ieee80211_beacon_get: no 
rate 
-  found\n, local-mdev-name);
+   printk(KERN_DEBUG wiphy%d: 
ieee80211_beacon_get: no rate 
+  found\n, local-hw.index);
}
dev_kfree_skb(skb);
return NULL;
@@ -1977,10 +1979,11 @@ static void ieee80211_tx_timeout(struct 
 {
struct ieee80211_local *local = dev-ieee80211_ptr;
 
-   printk(KERN_WARNING %s: resetting interface.\n, dev-name);
+   printk(KERN_WARNING wiphy%d: resetting interface.\n, local-hw.index);
 
if (local-ops-reset(local_to_hw(local)))
-   printk(KERN_ERR %s: failed to reset interface.\n, dev-name);
+   printk(KERN_ERR wiphy%d: failed to reset interface.\n,
+  local-hw.index);
else
netif_wake_queue(dev);
 }
@@ -3493,24 +3496,25 @@ static void ieee80211_rx_michael_mic_rep
 
/* TODO: verify that this is not triggered by fragmented
 * frames (hw does not verify MIC for them). */
-   printk(KERN_DEBUG %s: TKIP hwaccel reported Michael MIC 
+   printk(KERN_DEBUG wiphy%d: TKIP hwaccel reported Michael MIC 
   failure from