2007-04-27 19:59:13

by Michael Wu

[permalink] [raw]
Subject: [PATCH] mac80211: don't export linux/ieee80211.h

From: Michael Wu <[email protected]>

The definitions in linux/ieee80211.h don't need to be exported.

Signed-off-by: Michael Wu <[email protected]>
---

include/linux/Kbuild | 1 -
include/linux/ieee80211.h | 56 +++++++++++++++++++++++----------------------
2 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 2781d33..7a1bb18 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -70,7 +70,6 @@ header-y += hysdn_if.h
header-y += i2c-dev.h
header-y += i8k.h
header-y += icmp.h
-header-y += ieee80211.h
header-y += if_arcnet.h
header-y += if_arp.h
header-y += if_bonding.h
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index ae19306..ecd61e8 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -98,20 +98,20 @@
struct ieee80211_hdr {
__le16 frame_control;
__le16 duration_id;
- __u8 addr1[6];
- __u8 addr2[6];
- __u8 addr3[6];
+ u8 addr1[6];
+ u8 addr2[6];
+ u8 addr3[6];
__le16 seq_ctrl;
- __u8 addr4[6];
+ u8 addr4[6];
} __attribute__ ((packed));


struct ieee80211_mgmt {
__le16 frame_control;
__le16 duration;
- __u8 da[6];
- __u8 sa[6];
- __u8 bssid[6];
+ u8 da[6];
+ u8 sa[6];
+ u8 bssid[6];
__le16 seq_ctrl;
union {
struct {
@@ -119,7 +119,7 @@ struct ieee80211_mgmt {
__le16 auth_transaction;
__le16 status_code;
/* possibly followed by Challenge text */
- __u8 variable[0];
+ u8 variable[0];
} __attribute__ ((packed)) auth;
struct {
__le16 reason_code;
@@ -135,14 +135,14 @@ struct ieee80211_mgmt {
__le16 status_code;
__le16 aid;
/* followed by Supported rates */
- __u8 variable[0];
+ u8 variable[0];
} __attribute__ ((packed)) assoc_resp, reassoc_resp;
struct {
__le16 capab_info;
__le16 listen_interval;
- __u8 current_ap[6];
+ u8 current_ap[6];
/* followed by SSID and Supported rates */
- __u8 variable[0];
+ u8 variable[0];
} __attribute__ ((packed)) reassoc_req;
struct {
__le16 reason_code;
@@ -153,11 +153,11 @@ struct ieee80211_mgmt {
__le16 capab_info;
/* followed by some of SSID, Supported rates,
* FH Params, DS Params, CF Params, IBSS Params, TIM */
- __u8 variable[0];
+ u8 variable[0];
} __attribute__ ((packed)) beacon;
struct {
/* only variable items: SSID, Supported rates */
- __u8 variable[0];
+ u8 variable[0];
} __attribute__ ((packed)) probe_req;
struct {
__le64 timestamp;
@@ -165,24 +165,24 @@ struct ieee80211_mgmt {
__le16 capab_info;
/* followed by some of SSID, Supported rates,
* FH Params, DS Params, CF Params, IBSS Params */
- __u8 variable[0];
+ u8 variable[0];
} __attribute__ ((packed)) probe_resp;
struct {
- __u8 category;
+ u8 category;
union {
struct {
- __u8 action_code;
- __u8 dialog_token;
- __u8 status_code;
- __u8 variable[0];
+ u8 action_code;
+ u8 dialog_token;
+ u8 status_code;
+ u8 variable[0];
} __attribute__ ((packed)) wme_action;
struct{
- __u8 action_code;
- __u8 element_id;
- __u8 length;
- __u8 switch_mode;
- __u8 new_chan;
- __u8 switch_count;
+ u8 action_code;
+ u8 element_id;
+ u8 length;
+ u8 switch_mode;
+ u8 new_chan;
+ u8 switch_count;
} __attribute__((packed)) chan_switch;
} u;
} __attribute__ ((packed)) action;
@@ -194,14 +194,14 @@ struct ieee80211_mgmt {
struct ieee80211_rts {
__le16 frame_control;
__le16 duration;
- __u8 ra[6];
- __u8 ta[6];
+ u8 ra[6];
+ u8 ta[6];
} __attribute__ ((packed));

struct ieee80211_cts {
__le16 frame_control;
__le16 duration;
- __u8 ra[6];
+ u8 ra[6];
} __attribute__ ((packed));




2007-04-27 20:34:42

by Michael Wu

[permalink] [raw]
Subject: Re: [PATCH] mac80211: don't export linux/ieee80211.h

On Friday 27 April 2007 16:22, Michael Buesch wrote:
> Whether they should be exported or not...
> Why change all __u8 to u8? I don't see the point.
I'm just reverting the structs back to what they looked like before they
needed to be exported to userspace.

-Michael Wu


Attachments:
(No filename) (272.00 B)
(No filename) (189.00 B)
Download all attachments

2007-04-27 20:17:45

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: don't export linux/ieee80211.h

On Fri, 2007-04-27 at 15:54 -0400, Michael Wu wrote:

> The definitions in linux/ieee80211.h don't need to be exported.

Actually, cfg80211 depends on the cipher suite defines. These are of
course well-known constants and can be found in the specs, but I don't
see the point of not just exporting them.

Does anybody remember a reason why this should not be exported?

johannes


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

2007-04-27 20:22:31

by Michael Büsch

[permalink] [raw]
Subject: Re: [PATCH] mac80211: don't export linux/ieee80211.h

On Friday 27 April 2007 21:54:55 Michael Wu wrote:
> From: Michael Wu <[email protected]>
>
> The definitions in linux/ieee80211.h don't need to be exported.
>
> Signed-off-by: Michael Wu <[email protected]>

Whether they should be exported or not...
Why change all __u8 to u8? I don't see the point.

--
Greetings Michael.