linux-2.6: Add a driver to run an MMC or SD card over a GPIO based SPI interface.
[openwrt.git] / package / mac80211 / patches / 001-port-to-2.6.23.patch
1 Index: mac80211/net/mac80211/ieee80211.c
2 ===================================================================
3 --- mac80211.orig/net/mac80211/ieee80211.c 2008-02-15 22:20:53.000000000 +0100
4 +++ mac80211/net/mac80211/ieee80211.c 2008-02-15 22:21:01.000000000 +0100
5 @@ -21,7 +21,6 @@
6 #include <linux/wireless.h>
7 #include <linux/rtnetlink.h>
8 #include <linux/bitmap.h>
9 -#include <net/net_namespace.h>
10 #include <net/cfg80211.h>
11
12 #include "ieee80211_i.h"
13 @@ -36,6 +35,15 @@
14
15 #define SUPP_MCS_SET_LEN 16
16
17 +
18 +char *print_mac(char *buf, const u8 *addr)
19 +{
20 + sprintf(buf, MAC_FMT,
21 + addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
22 + return buf;
23 +}
24 +
25 +
26 /*
27 * For seeing transmitted packets on monitor interfaces
28 * we have a radiotap header too.
29 @@ -48,11 +56,13 @@ struct ieee80211_tx_status_rtap_hdr {
30
31 /* common interface routines */
32
33 +#if 0
34 static int header_parse_80211(const struct sk_buff *skb, unsigned char *haddr)
35 {
36 memcpy(haddr, skb_mac_header(skb) + 10, ETH_ALEN); /* addr2 */
37 return ETH_ALEN;
38 }
39 +#endif
40
41 /* must be called under mdev tx lock */
42 static void ieee80211_configure_filter(struct ieee80211_local *local)
43 @@ -800,6 +810,7 @@ static void ieee80211_set_multicast_list
44 dev_mc_sync(local->mdev, dev);
45 }
46
47 +#if 0
48 static const struct header_ops ieee80211_header_ops = {
49 .create = eth_header,
50 .parse = header_parse_80211,
51 @@ -807,6 +818,7 @@ static const struct header_ops ieee80211
52 .cache = eth_header_cache,
53 .cache_update = eth_header_cache_update,
54 };
55 +#endif
56
57 /* Must not be called for mdev */
58 void ieee80211_if_setup(struct net_device *dev)
59 @@ -1455,7 +1467,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(
60 mdev->open = ieee80211_master_open;
61 mdev->stop = ieee80211_master_stop;
62 mdev->type = ARPHRD_IEEE80211;
63 - mdev->header_ops = &ieee80211_header_ops;
64 +// mdev->header_ops = &ieee80211_header_ops;
65 mdev->set_multicast_list = ieee80211_master_set_multicast_list;
66
67 sdata->vif.type = IEEE80211_IF_TYPE_AP;
68 Index: mac80211/net/mac80211/ieee80211_i.h
69 ===================================================================
70 --- mac80211.orig/net/mac80211/ieee80211_i.h 2008-02-15 22:20:53.000000000 +0100
71 +++ mac80211/net/mac80211/ieee80211_i.h 2008-02-15 22:21:37.000000000 +0100
72 @@ -26,6 +26,16 @@
73 #include "ieee80211_key.h"
74 #include "sta_info.h"
75
76 +
77 +#define BIT(nr) (1 << (nr))
78 +
79 +#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
80 +extern char *print_mac(char *buf, const u8 *addr);
81 +#define DECLARE_MAC_BUF(var) char var[18] __maybe_unused
82 +
83 +#define CONFIG_MAC80211_RC_DEFAULT __stringify(__CONFIG_MAC80211_RC_DEFAULT)
84 +
85 +
86 /* ieee80211.o internal definitions, etc. These are not included into
87 * low-level drivers. */
88
89 Index: mac80211/net/mac80211/ieee80211_ioctl.c
90 ===================================================================
91 --- mac80211.orig/net/mac80211/ieee80211_ioctl.c 2008-02-15 22:20:53.000000000 +0100
92 +++ mac80211/net/mac80211/ieee80211_ioctl.c 2008-02-15 22:21:01.000000000 +0100
93 @@ -207,7 +207,7 @@ static int ieee80211_ioctl_giwrange(stru
94 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
95 IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN);
96
97 - range->scan_capa |= IW_SCAN_CAPA_ESSID;
98 +// range->scan_capa |= IW_SCAN_CAPA_ESSID;
99
100 return 0;
101 }
102 Index: mac80211/net/wireless/core.c
103 ===================================================================
104 --- mac80211.orig/net/wireless/core.c 2008-02-15 22:20:53.000000000 +0100
105 +++ mac80211/net/wireless/core.c 2008-02-15 22:21:01.000000000 +0100
106 @@ -69,7 +69,7 @@ __cfg80211_drv_from_info(struct genl_inf
107
108 if (info->attrs[NL80211_ATTR_IFINDEX]) {
109 ifindex = nla_get_u32(info->attrs[NL80211_ATTR_IFINDEX]);
110 - dev = dev_get_by_index(&init_net, ifindex);
111 + dev = dev_get_by_index(ifindex);
112 if (dev) {
113 if (dev->ieee80211_ptr)
114 byifidx =
115 @@ -120,7 +120,7 @@ cfg80211_get_dev_from_ifindex(int ifinde
116 struct net_device *dev;
117
118 mutex_lock(&cfg80211_drv_mutex);
119 - dev = dev_get_by_index(&init_net, ifindex);
120 + dev = dev_get_by_index(ifindex);
121 if (!dev)
122 goto out;
123 if (dev->ieee80211_ptr) {
124 Index: mac80211/net/wireless/nl80211.c
125 ===================================================================
126 --- mac80211.orig/net/wireless/nl80211.c 2008-02-15 22:20:53.000000000 +0100
127 +++ mac80211/net/wireless/nl80211.c 2008-02-15 22:21:01.000000000 +0100
128 @@ -39,7 +39,7 @@ static int get_drv_dev_by_info_ifindex(s
129 return -EINVAL;
130
131 ifindex = nla_get_u32(info->attrs[NL80211_ATTR_IFINDEX]);
132 - *dev = dev_get_by_index(&init_net, ifindex);
133 + *dev = dev_get_by_index(ifindex);
134 if (!*dev)
135 return -ENODEV;
136
137 @@ -959,7 +959,7 @@ static int get_vlan(struct nlattr *vlana
138 *vlan = NULL;
139
140 if (vlanattr) {
141 - *vlan = dev_get_by_index(&init_net, nla_get_u32(vlanattr));
142 + *vlan = dev_get_by_index(nla_get_u32(vlanattr));
143 if (!*vlan)
144 return -ENODEV;
145 if (!(*vlan)->ieee80211_ptr)
146 Index: mac80211/net/mac80211/cfg.c
147 ===================================================================
148 --- mac80211.orig/net/mac80211/cfg.c 2008-02-15 22:20:53.000000000 +0100
149 +++ mac80211/net/mac80211/cfg.c 2008-02-15 22:21:01.000000000 +0100
150 @@ -9,7 +9,6 @@
151 #include <linux/ieee80211.h>
152 #include <linux/nl80211.h>
153 #include <linux/rtnetlink.h>
154 -#include <net/net_namespace.h>
155 #include <linux/rcupdate.h>
156 #include <net/cfg80211.h>
157 #include "ieee80211_i.h"
158 @@ -68,7 +67,7 @@ static int ieee80211_del_iface(struct wi
159 return -ENODEV;
160
161 /* we're under RTNL */
162 - dev = __dev_get_by_index(&init_net, ifindex);
163 + dev = __dev_get_by_index(ifindex);
164 if (!dev)
165 return 0;
166
167 @@ -89,7 +88,7 @@ static int ieee80211_change_iface(struct
168 return -ENODEV;
169
170 /* we're under RTNL */
171 - dev = __dev_get_by_index(&init_net, ifindex);
172 + dev = __dev_get_by_index(ifindex);
173 if (!dev)
174 return -ENODEV;
175
176 Index: mac80211/net/mac80211/tx.c
177 ===================================================================
178 --- mac80211.orig/net/mac80211/tx.c 2008-02-15 22:20:53.000000000 +0100
179 +++ mac80211/net/mac80211/tx.c 2008-02-15 22:21:01.000000000 +0100
180 @@ -18,7 +18,6 @@
181 #include <linux/etherdevice.h>
182 #include <linux/bitmap.h>
183 #include <linux/rcupdate.h>
184 -#include <net/net_namespace.h>
185 #include <net/ieee80211_radiotap.h>
186 #include <net/cfg80211.h>
187 #include <net/mac80211.h>
188 @@ -1051,7 +1050,7 @@ static int ieee80211_tx_prepare(struct i
189 struct net_device *dev;
190
191 pkt_data = (struct ieee80211_tx_packet_data *)skb->cb;
192 - dev = dev_get_by_index(&init_net, pkt_data->ifindex);
193 + dev = dev_get_by_index(pkt_data->ifindex);
194 if (unlikely(dev && !is_ieee80211_device(dev, mdev))) {
195 dev_put(dev);
196 dev = NULL;
197 @@ -1265,7 +1264,7 @@ int ieee80211_master_start_xmit(struct s
198 memset(&control, 0, sizeof(struct ieee80211_tx_control));
199
200 if (pkt_data->ifindex)
201 - odev = dev_get_by_index(&init_net, pkt_data->ifindex);
202 + odev = dev_get_by_index(pkt_data->ifindex);
203 if (unlikely(odev && !is_ieee80211_device(odev, dev))) {
204 dev_put(odev);
205 odev = NULL;
206 Index: mac80211/net/mac80211/util.c
207 ===================================================================
208 --- mac80211.orig/net/mac80211/util.c 2008-02-15 22:20:53.000000000 +0100
209 +++ mac80211/net/mac80211/util.c 2008-02-15 22:21:01.000000000 +0100
210 @@ -20,7 +20,6 @@
211 #include <linux/if_arp.h>
212 #include <linux/wireless.h>
213 #include <linux/bitmap.h>
214 -#include <net/net_namespace.h>
215 #include <net/cfg80211.h>
216 #include <net/rtnetlink.h>
217
218 Index: mac80211/net/wireless/sysfs.c
219 ===================================================================
220 --- mac80211.orig/net/wireless/sysfs.c 2008-02-15 22:20:53.000000000 +0100
221 +++ mac80211/net/wireless/sysfs.c 2008-02-15 22:21:01.000000000 +0100
222 @@ -53,7 +53,8 @@ static void wiphy_dev_release(struct dev
223 }
224
225 #ifdef CONFIG_HOTPLUG
226 -static int wiphy_uevent(struct device *dev, struct kobj_uevent_env *env)
227 +static int wiphy_uevent(struct device *dev, char **envp, int num_envp,
228 + char *buffer, int buffer_size)
229 {
230 /* TODO, we probably need stuff here */
231 return 0;
This page took 0.047326 seconds and 5 git commands to generate.