get rid of CRLF encoding in various files
[librecmc/librecmc.git] / package / acx-mac80211 / patches / 004-wireless-compat.patch
1 Index: acx-mac80211-20100422/acx_func.h
2 ===================================================================
3 --- acx-mac80211-20100422.orig/acx_func.h       2010-05-02 03:07:09.000000000 +0200
4 +++ acx-mac80211-20100422/acx_func.h    2010-05-02 22:03:28.309677381 +0200
5 @@ -214,10 +214,6 @@
6                         printk(args); \
7         } while (0)
8  
9 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
10 -#define printk_ratelimited(args...) printk(args)
11 -#endif
12 -
13  // Log with prefix "acx: __func__ 
14  #define logf0(chan, msg) \
15                 log(chan, "acx: %s: " msg, __func__);
16 @@ -341,17 +337,10 @@
17  // BOM Mac80211 Ops (Common)
18  // -----
19  
20 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
21 -int acx_e_op_add_interface(struct ieee80211_hw* ieee,
22 -               struct ieee80211_if_init_conf *conf);
23 -void acx_e_op_remove_interface(struct ieee80211_hw* ieee,
24 -               struct ieee80211_if_init_conf *conf);
25 -#else
26  int acx_e_op_add_interface(struct ieee80211_hw* ieee,
27                 struct ieee80211_vif *vif);
28  void acx_e_op_remove_interface(struct ieee80211_hw* ieee,
29                 struct ieee80211_vif *vif);
30 -#endif
31  
32  int acx_e_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
33                 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
34 @@ -366,10 +355,6 @@
35                 const struct ieee80211_tx_queue_params *params);
36  int acx_e_op_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats);
37  
38 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
39 -int acx_e_op_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
40 -#endif
41 -
42  // BOM Helpers (Common)
43  // -----
44  void acx_s_mwait(int ms);
45 Index: acx-mac80211-20100422/common.c
46 ===================================================================
47 --- acx-mac80211-20100422.orig/common.c 2010-05-02 03:07:09.000000000 +0200
48 +++ acx-mac80211-20100422/common.c      2010-05-02 22:04:49.597801719 +0200
49 @@ -4900,13 +4900,8 @@
50   * ==================================================
51   */
52  
53 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
54 -int acx_e_op_add_interface(struct ieee80211_hw *ieee,
55 -                     struct ieee80211_if_init_conf *conf)
56 -#else
57  int acx_e_op_add_interface(struct ieee80211_hw *ieee,
58                       struct ieee80211_vif *vif)
59 -#endif
60  {
61         acx_device_t *adev = ieee2adev(ieee);
62         unsigned long flags;
63 @@ -4918,23 +4913,14 @@
64         acx_sem_lock(adev);
65         acx_lock(adev, flags);
66  
67 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
68 -       if (conf->type == NL80211_IFTYPE_MONITOR) {
69 -#else
70         if (vif->type == NL80211_IFTYPE_MONITOR) {
71 -#endif
72                 adev->interface.monitor++;
73         } else {
74                 if (adev->interface.operating)
75                         goto out_unlock;
76                 adev->interface.operating = 1;
77 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
78 -               adev->interface.mac_addr = conf->mac_addr;
79 -               adev->interface.type = conf->type;
80 -#else
81                 adev->interface.mac_addr = vif->addr;
82                 adev->interface.type = vif->type;
83 -#endif
84         }
85  //     adev->mode = conf->type;
86  
87 @@ -4949,13 +4935,8 @@
88  
89         printk(KERN_INFO "acx: Virtual interface added "
90                "(type: 0x%08X, MAC: %s)\n",
91 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
92 -              conf->type,
93 -              acx_print_mac(mac, conf->mac_addr)
94 -#else
95                vif->type,
96                acx_print_mac(mac, vif->addr)
97 -#endif
98         );
99  
100      out_unlock:
101 @@ -4966,13 +4947,8 @@
102         return err;
103  }
104  
105 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
106 -void acx_e_op_remove_interface(struct ieee80211_hw *hw,
107 -                         struct ieee80211_if_init_conf *conf)
108 -#else
109  void acx_e_op_remove_interface(struct ieee80211_hw *hw,
110                           struct ieee80211_vif *vif)
111 -#endif
112  {
113         acx_device_t *adev = ieee2adev(hw);
114  
115 @@ -4981,37 +4957,23 @@
116         FN_ENTER;
117         acx_sem_lock(adev);
118  
119 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
120 -       if (conf->type == NL80211_IFTYPE_MONITOR) {
121 -#else
122         if (vif->type == NL80211_IFTYPE_MONITOR) {
123 -#endif
124                 adev->interface.monitor--;
125  //      assert(bcm->interface.monitor >= 0);
126         } else {
127                 adev->interface.operating = 0;
128         }
129  
130 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
131 -       log(L_DEBUG, "acx: %s: interface.operating=%d, conf->type=%d\n",
132 -                       __func__,
133 -                       adev->interface.operating, conf->type);
134 -#else
135         log(L_DEBUG, "acx: %s: interface.operating=%d, vif->type=%d\n",
136                         __func__,
137                         adev->interface.operating, vif->type);
138 -#endif
139  
140         if (adev->initialized)
141                 acx_s_select_opmode(adev);
142  
143         log(L_ANY, "acx: Virtual interface removed: "
144                "type=%d, MAC=%s\n",
145 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
146 -              conf->type, acx_print_mac(mac, conf->mac_addr)
147 -#else
148                vif->type, acx_print_mac(mac, vif->addr)
149 -#endif
150                );
151  
152         acx_sem_unlock(adev);
153 @@ -5351,26 +5313,6 @@
154         return 0;
155  }
156  
157 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
158 -int acx_e_op_get_tx_stats(struct ieee80211_hw *hw,
159 -                        struct ieee80211_tx_queue_stats *stats)
160 -{
161 -       acx_device_t *adev = ieee2adev(hw);
162 -       int err = -ENODEV;
163 -
164 -       FN_ENTER;
165 -       acx_sem_lock(adev);
166 -
167 -       stats->len = 0;
168 -       stats->limit = TX_CNT;
169 -       stats->count = 0;
170 -
171 -       acx_sem_unlock(adev);
172 -       FN_EXIT0;
173 -       return err;
174 -}
175 -#endif
176 -
177  /*
178   * BOM Helpers
179   * ==================================================
180 Index: acx-mac80211-20100422/mem.c
181 ===================================================================
182 --- acx-mac80211-20100422.orig/mem.c    2010-05-02 03:07:09.000000000 +0200
183 +++ acx-mac80211-20100422/mem.c 2010-05-02 22:05:26.007552341 +0200
184 @@ -4654,9 +4654,6 @@
185                 .bss_info_changed = acx_e_op_bss_info_changed,
186                 .set_key = acx_e_op_set_key,
187                 .get_stats = acx_e_op_get_stats,
188 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
189 -               .get_tx_stats = acx_e_op_get_tx_stats,
190 -#endif
191                 };
192  
193  /*
194 Index: acx-mac80211-20100422/pci.c
195 ===================================================================
196 --- acx-mac80211-20100422.orig/pci.c    2010-05-02 03:07:09.000000000 +0200
197 +++ acx-mac80211-20100422/pci.c 2010-05-02 22:06:03.758564021 +0200
198 @@ -3149,9 +3149,6 @@
199         .bss_info_changed = acx_e_op_bss_info_changed,
200         .set_key = acx_e_op_set_key,
201         .get_stats = acx_e_op_get_stats,
202 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
203 -       .get_tx_stats = acx_e_op_get_tx_stats,
204 -#endif
205  };
206  
207  
208 Index: acx-mac80211-20100422/usb.c
209 ===================================================================
210 --- acx-mac80211-20100422.orig/usb.c    2010-05-02 03:07:09.000000000 +0200
211 +++ acx-mac80211-20100422/usb.c 2010-05-02 22:06:22.874733862 +0200
212 @@ -1444,9 +1444,6 @@
213         .bss_info_changed = acx_e_op_bss_info_changed,
214         .set_key = acx_e_op_set_key,
215         .get_stats = acx_e_op_get_stats,
216 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
217 -       .get_tx_stats = acx_e_op_get_tx_stats,
218 -#endif
219  };
220  
221  /*