* [PATCH 0/4] remove a few more unused constants
@ 2007-08-10 22:05 Johannes Berg
2007-08-10 22:05 ` [PATCH 1/4] mac80211: remove ieee80211_msg_wep_frame_unknown_key Johannes Berg
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Johannes Berg @ 2007-08-10 22:05 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, linux-wireless
Resend of the patches from just a few minutes ago against the 'everything' branch.
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/4] mac80211: remove ieee80211_msg_wep_frame_unknown_key
2007-08-10 22:05 [PATCH 0/4] remove a few more unused constants Johannes Berg
@ 2007-08-10 22:05 ` Johannes Berg
2007-08-10 22:05 ` [PATCH 2/4] mac80211: dont send frames from unassociated stations up Johannes Berg
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2007-08-10 22:05 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, linux-wireless
Neither hostapd nor wpa_supplicant really use it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211_common.h | 2 +-
net/mac80211/rx.c | 11 +++++------
2 files changed, 6 insertions(+), 7 deletions(-)
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-10 23:55:56.063840246 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-11 00:01:27.643840246 +0200
@@ -350,12 +350,11 @@ ieee80211_rx_h_load_key(struct ieee80211
MAC_ARG(hdr->addr1),
MAC_ARG(hdr->addr2),
MAC_ARG(hdr->addr3));
- if (!rx->local->apdev)
- return TXRX_DROP;
- ieee80211_rx_mgmt(
- rx->local, rx->skb, rx->u.rx.status,
- ieee80211_msg_wep_frame_unknown_key);
- return TXRX_QUEUED;
+ /*
+ * TODO: notify userspace about this
+ * via cfg/nl80211
+ */
+ return TXRX_DROP;
}
}
}
--- wireless-dev.orig/net/mac80211/ieee80211_common.h 2007-08-10 23:50:37.933840246 +0200
+++ wireless-dev/net/mac80211/ieee80211_common.h 2007-08-11 00:01:27.643840246 +0200
@@ -48,7 +48,7 @@ enum ieee80211_msg_type {
ieee80211_msg_tx_callback_ack = 1,
ieee80211_msg_tx_callback_fail = 2,
/* hole at 3, was ieee80211_msg_passive_scan but unused */
- ieee80211_msg_wep_frame_unknown_key = 4,
+ /* hole at 4, was ieee80211_msg_wep_frame_unknown_key but now unused */
ieee80211_msg_michael_mic_failure = 5,
/* hole at 6, was monitor but never sent to userspace */
ieee80211_msg_sta_not_assoc = 7,
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/4] mac80211: dont send frames from unassociated stations up
2007-08-10 22:05 [PATCH 0/4] remove a few more unused constants Johannes Berg
2007-08-10 22:05 ` [PATCH 1/4] mac80211: remove ieee80211_msg_wep_frame_unknown_key Johannes Berg
@ 2007-08-10 22:05 ` Johannes Berg
2007-08-10 22:05 ` [PATCH 3/4] mac80211: remove ieee80211_msg_key_threshold_notification Johannes Berg
2007-08-10 22:05 ` [PATCH 4/4] mac80211: remove radar stuff Johannes Berg
3 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2007-08-10 22:05 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, linux-wireless
Hostapd doesn't care anyway right now. And it could probably use the
monitor interface if we added a flag or something.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211_common.h | 2 +-
net/mac80211/rx.c | 13 +++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
--- wireless-dev.orig/net/mac80211/rx.c 2007-08-11 00:01:27.643840246 +0200
+++ wireless-dev/net/mac80211/rx.c 2007-08-11 00:01:42.273840246 +0200
@@ -301,12 +301,13 @@ ieee80211_rx_h_check(struct ieee80211_tx
return TXRX_DROP;
}
- if (!rx->local->apdev)
- return TXRX_DROP;
-
- ieee80211_rx_mgmt(rx->local, rx->skb, rx->u.rx.status,
- ieee80211_msg_sta_not_assoc);
- return TXRX_QUEUED;
+ /*
+ * TODO: hostapd is really responsible for this.
+ * But it doesn't care right now. So until it wants to care
+ * drop it, and at that point just add a radiotap flag
+ * or something
+ */
+ return TXRX_DROP;
}
return TXRX_CONTINUE;
--- wireless-dev.orig/net/mac80211/ieee80211_common.h 2007-08-11 00:01:27.643840246 +0200
+++ wireless-dev/net/mac80211/ieee80211_common.h 2007-08-11 00:01:42.273840246 +0200
@@ -51,7 +51,7 @@ enum ieee80211_msg_type {
/* hole at 4, was ieee80211_msg_wep_frame_unknown_key but now unused */
ieee80211_msg_michael_mic_failure = 5,
/* hole at 6, was monitor but never sent to userspace */
- ieee80211_msg_sta_not_assoc = 7,
+ /* hole at 7, was ieee80211_msg_sta_not_assoc but now unused */
/* 8 was ieee80211_msg_set_aid_for_sta */
ieee80211_msg_key_threshold_notification = 9,
ieee80211_msg_radar = 11,
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/4] mac80211: remove ieee80211_msg_key_threshold_notification
2007-08-10 22:05 [PATCH 0/4] remove a few more unused constants Johannes Berg
2007-08-10 22:05 ` [PATCH 1/4] mac80211: remove ieee80211_msg_wep_frame_unknown_key Johannes Berg
2007-08-10 22:05 ` [PATCH 2/4] mac80211: dont send frames from unassociated stations up Johannes Berg
@ 2007-08-10 22:05 ` Johannes Berg
2007-08-10 22:05 ` [PATCH 4/4] mac80211: remove radar stuff Johannes Berg
3 siblings, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2007-08-10 22:05 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, linux-wireless
Hostapd doesn't care at the moment.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
net/mac80211/ieee80211.c | 31 ++-----------------------------
net/mac80211/ieee80211_common.h | 2 +-
2 files changed, 3 insertions(+), 30 deletions(-)
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-11 00:01:06.323840246 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-11 00:01:44.943840246 +0200
@@ -233,35 +233,8 @@ void ieee80211_key_threshold_notify(stru
struct ieee80211_key *key,
struct sta_info *sta)
{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- struct sk_buff *skb;
- struct ieee80211_msg_key_notification *msg;
-
- /* if no one will get it anyway, don't even allocate it.
- * unlikely because this is only relevant for APs
- * where the device must be open... */
- if (unlikely(!local->apdev))
- return;
-
- skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) +
- sizeof(struct ieee80211_msg_key_notification));
- if (!skb)
- return;
-
- skb_reserve(skb, sizeof(struct ieee80211_frame_info));
- msg = (struct ieee80211_msg_key_notification *)
- skb_put(skb, sizeof(struct ieee80211_msg_key_notification));
- msg->tx_rx_count = key->tx_rx_count;
- memcpy(msg->ifname, dev->name, IFNAMSIZ);
- if (sta)
- memcpy(msg->addr, sta->addr, ETH_ALEN);
- else
- memset(msg->addr, 0xff, ETH_ALEN);
-
- key->tx_rx_count = 0;
-
- ieee80211_rx_mgmt(local, skb, NULL,
- ieee80211_msg_key_threshold_notification);
+ /* dummy function for when we add back support */
+ /* TODO: add back support via cfg80211/nl80211 */
}
static int ieee80211_mgmt_open(struct net_device *dev)
--- wireless-dev.orig/net/mac80211/ieee80211_common.h 2007-08-11 00:01:42.273840246 +0200
+++ wireless-dev/net/mac80211/ieee80211_common.h 2007-08-11 00:01:44.943840246 +0200
@@ -53,7 +53,7 @@ enum ieee80211_msg_type {
/* hole at 6, was monitor but never sent to userspace */
/* hole at 7, was ieee80211_msg_sta_not_assoc but now unused */
/* 8 was ieee80211_msg_set_aid_for_sta */
- ieee80211_msg_key_threshold_notification = 9,
+ /* hole at 9, was ieee80211_msg_key_threshold_notification */
ieee80211_msg_radar = 11,
};
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] mac80211: remove radar stuff
2007-08-10 22:05 [PATCH 0/4] remove a few more unused constants Johannes Berg
` (2 preceding siblings ...)
2007-08-10 22:05 ` [PATCH 3/4] mac80211: remove ieee80211_msg_key_threshold_notification Johannes Berg
@ 2007-08-10 22:05 ` Johannes Berg
2007-08-11 3:18 ` Larry Finger
3 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2007-08-10 22:05 UTC (permalink / raw)
To: John Linville; +Cc: Jiri Benc, linux-wireless
Unused in drivers, userspace and mac80211.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
include/net/mac80211.h | 6 ------
net/mac80211/ieee80211.c | 28 ----------------------------
net/mac80211/ieee80211_common.h | 2 +-
3 files changed, 1 insertion(+), 35 deletions(-)
--- wireless-dev.orig/include/net/mac80211.h 2007-08-10 23:55:56.363840246 +0200
+++ wireless-dev/include/net/mac80211.h 2007-08-11 00:02:16.053840246 +0200
@@ -1038,12 +1038,6 @@ ieee80211_get_mc_list_item(struct ieee80
/* called by driver to notify scan status completed */
void ieee80211_scan_completed(struct ieee80211_hw *hw);
-/* Function to indicate Radar Detection. The low level driver must call this
- * function to indicate the presence of radar in the current channel.
- * Additionally the radar type also could be sent */
-int ieee80211_radar_status(struct ieee80211_hw *hw, int channel,
- int radar, int radar_type);
-
/* return a pointer to the source address (SA) */
static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr)
{
--- wireless-dev.orig/net/mac80211/ieee80211.c 2007-08-11 00:01:44.943840246 +0200
+++ wireless-dev/net/mac80211/ieee80211.c 2007-08-11 00:02:29.073840246 +0200
@@ -201,34 +201,6 @@ ieee80211_rx_mgmt(struct ieee80211_local
netif_rx(skb);
}
-int ieee80211_radar_status(struct ieee80211_hw *hw, int channel,
- int radar, int radar_type)
-{
- struct sk_buff *skb;
- struct ieee80211_radar_info *msg;
- struct ieee80211_local *local = hw_to_local(hw);
-
- if (!local->apdev)
- return 0;
-
- skb = dev_alloc_skb(sizeof(struct ieee80211_frame_info) +
- sizeof(struct ieee80211_radar_info));
-
- if (!skb)
- return -ENOMEM;
- skb_reserve(skb, sizeof(struct ieee80211_frame_info));
-
- msg = (struct ieee80211_radar_info *)
- skb_put(skb, sizeof(struct ieee80211_radar_info));
- msg->channel = channel;
- msg->radar = radar;
- msg->radar_type = radar_type;
-
- ieee80211_rx_mgmt(local, skb, NULL, ieee80211_msg_radar);
- return 0;
-}
-EXPORT_SYMBOL(ieee80211_radar_status);
-
void ieee80211_key_threshold_notify(struct net_device *dev,
struct ieee80211_key *key,
struct sta_info *sta)
--- wireless-dev.orig/net/mac80211/ieee80211_common.h 2007-08-11 00:01:44.943840246 +0200
+++ wireless-dev/net/mac80211/ieee80211_common.h 2007-08-11 00:02:16.063840246 +0200
@@ -54,7 +54,7 @@ enum ieee80211_msg_type {
/* hole at 7, was ieee80211_msg_sta_not_assoc but now unused */
/* 8 was ieee80211_msg_set_aid_for_sta */
/* hole at 9, was ieee80211_msg_key_threshold_notification */
- ieee80211_msg_radar = 11,
+ /* 11 was ieee80211_msg_radar */
};
struct ieee80211_msg_key_notification {
--
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] mac80211: remove radar stuff
2007-08-10 22:05 ` [PATCH 4/4] mac80211: remove radar stuff Johannes Berg
@ 2007-08-11 3:18 ` Larry Finger
2007-08-11 8:17 ` Johannes Berg
0 siblings, 1 reply; 8+ messages in thread
From: Larry Finger @ 2007-08-11 3:18 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, linux-wireless
Johannes Berg wrote:
> Unused in drivers, userspace and mac80211.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
Won't 802.11a drivers need this? If so, does it hurt to leave it in for now?
Larry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] mac80211: remove radar stuff
2007-08-11 3:18 ` Larry Finger
@ 2007-08-11 8:17 ` Johannes Berg
2007-08-11 17:00 ` Larry Finger
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2007-08-11 8:17 UTC (permalink / raw)
To: Larry Finger; +Cc: John Linville, Jiri Benc, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 842 bytes --]
On Fri, 2007-08-10 at 22:18 -0500, Larry Finger wrote:
> Johannes Berg wrote:
> > Unused in drivers, userspace and mac80211.
> >
> > Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> > ---
>
> Won't 802.11a drivers need this? If so, does it hurt to leave it in for now?
Absolutely correct, they probably will. None of the ones we have,
however, actually uses it, and it uses the management interface we're
trying to get rid of for the notification. The same function should
probably be added back to mac80211 or cfg80211 once somebody actually
wants it, but do the notification
1) with well-defined arguments (explanation for the two args anyone?)
2) via nl80211
It doesn't really "hurt" but I'm trying to actually remove the master
interface now and I'm almost there, so this code is in my way.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] mac80211: remove radar stuff
2007-08-11 8:17 ` Johannes Berg
@ 2007-08-11 17:00 ` Larry Finger
0 siblings, 0 replies; 8+ messages in thread
From: Larry Finger @ 2007-08-11 17:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, Jiri Benc, linux-wireless
Johannes Berg wrote:
> On Fri, 2007-08-10 at 22:18 -0500, Larry Finger wrote:
>> Johannes Berg wrote:
>>> Unused in drivers, userspace and mac80211.
>>>
>>> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
>>> ---
>> Won't 802.11a drivers need this? If so, does it hurt to leave it in for now?
>
> Absolutely correct, they probably will. None of the ones we have,
> however, actually uses it, and it uses the management interface we're
> trying to get rid of for the notification. The same function should
> probably be added back to mac80211 or cfg80211 once somebody actually
> wants it, but do the notification
> 1) with well-defined arguments (explanation for the two args anyone?)
> 2) via nl80211
>
> It doesn't really "hurt" but I'm trying to actually remove the master
> interface now and I'm almost there, so this code is in my way.
OK, thanks for the explanation.
Larry
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-08-11 17:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-10 22:05 [PATCH 0/4] remove a few more unused constants Johannes Berg
2007-08-10 22:05 ` [PATCH 1/4] mac80211: remove ieee80211_msg_wep_frame_unknown_key Johannes Berg
2007-08-10 22:05 ` [PATCH 2/4] mac80211: dont send frames from unassociated stations up Johannes Berg
2007-08-10 22:05 ` [PATCH 3/4] mac80211: remove ieee80211_msg_key_threshold_notification Johannes Berg
2007-08-10 22:05 ` [PATCH 4/4] mac80211: remove radar stuff Johannes Berg
2007-08-11 3:18 ` Larry Finger
2007-08-11 8:17 ` Johannes Berg
2007-08-11 17:00 ` Larry Finger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).