4e52963c81da2f7c7ef46c07824d78b85127d083
[openwrt/svn-archive/archive.git] / package / acx-mac80211 / patches / 003-if_types.patch
1 diff -urN acx-mac80211-20080805/acx_mac80211.h acx-mac80211-20080805.new/acx_mac80211.h
2 --- acx-mac80211-20080805/acx_mac80211.h 2009-05-07 14:32:44.000000000 +0200
3 +++ acx-mac80211-20080805.new/acx_mac80211.h 2009-05-07 15:59:45.000000000 +0200
4 @@ -36,7 +36,7 @@
5 /* Current BSSID (if any). */
6 u8 *bssid;
7
8 - /* Interface type. (IEEE80211_IF_TYPE_XXX) */
9 + /* Interface type. (NL80211_IFTYPE_XXX) */
10 int type;
11 /* Counter of active monitor interfaces. */
12 int monitor;
13 diff -urN acx-mac80211-20080805/common.c acx-mac80211-20080805.new/common.c
14 --- acx-mac80211-20080805/common.c 2009-05-07 14:32:44.000000000 +0200
15 +++ acx-mac80211-20080805.new/common.c 2009-05-07 16:11:26.000000000 +0200
16 @@ -4105,28 +4105,28 @@
17
18 if (adev->interface.operating) {
19 switch (adev->interface.type) {
20 - case IEEE80211_IF_TYPE_AP:
21 + case NL80211_IFTYPE_AP:
22 if (adev->mode != ACX_MODE_3_AP)
23 {
24 adev->mode = ACX_MODE_3_AP;
25 changed = 1;
26 }
27 break;
28 - case IEEE80211_IF_TYPE_IBSS:
29 + case NL80211_IFTYPE_ADHOC:
30 if (adev->mode != ACX_MODE_0_ADHOC)
31 {
32 adev->mode = ACX_MODE_0_ADHOC;
33 changed = 1;
34 }
35 break;
36 - case IEEE80211_IF_TYPE_STA:
37 + case NL80211_IFTYPE_STATION:
38 if (adev->mode != ACX_MODE_2_STA)
39 {
40 adev->mode = ACX_MODE_2_STA;
41 changed = 1;
42 }
43 break;
44 - case IEEE80211_IF_TYPE_WDS:
45 + case NL80211_IFTYPE_WDS:
46 default:
47 if (adev->mode != ACX_MODE_OFF)
48 {
49 @@ -4136,7 +4136,7 @@
50 break;
51 }
52 } else {
53 - if (adev->interface.type == IEEE80211_IF_TYPE_MNTR)
54 + if (adev->interface.type == NL80211_IFTYPE_MONITOR)
55 {
56 if (adev->mode != ACX_MODE_MONITOR)
57 {
58 @@ -4180,7 +4180,7 @@
59 FN_ENTER;
60 acx_lock(adev, flags);
61
62 - if (conf->type == IEEE80211_IF_TYPE_MNTR) {
63 + if (conf->type == NL80211_IFTYPE_MONITOR) {
64 adev->interface.monitor++;
65 } else {
66 if (adev->interface.operating)
67 @@ -4226,7 +4226,7 @@
68 FN_ENTER;
69
70 acx_sem_lock(adev);
71 - if (conf->type == IEEE80211_IF_TYPE_MNTR) {
72 + if (conf->type == NL80211_IFTYPE_MONITOR) {
73 adev->interface.monitor--;
74 // assert(bcm->interface.monitor >= 0);
75 } else {
76 @@ -4380,7 +4380,7 @@
77
78 acx_lock(adev, flags);
79
80 - if ((vif->type != IEEE80211_IF_TYPE_MNTR)
81 + if ((vif->type != NL80211_IFTYPE_MONITOR)
82 && (adev->vif == vif)) {
83 if (conf->bssid)
84 {
85 @@ -4388,7 +4388,7 @@
86 MAC_COPY(adev->bssid,conf->bssid);
87 }
88 }
89 - if ((vif->type == IEEE80211_IF_TYPE_AP)
90 + if ((vif->type == NL80211_IFTYPE_AP)
91 && (adev->vif == vif)) {
92 if ((conf->ssid_len > 0) && conf->ssid)
93 {