[ar7] migrate acx to netdev_ops, required for later kernels
[openwrt/svn-archive/archive.git] / package / acx-mac80211 / patches / 004-acx_config_interface_type.patch
1 --- a/acx_func.h
2 +++ b/acx_func.h
3 @@ -619,9 +619,10 @@ int acx_net_set_key(struct ieee80211_hw
4 enum set_key_cmd cmd,
5 const u8 *local_addr, const u8 *addr,
6 struct ieee80211_key_conf *key);
7 -extern int acx_config_interface(struct ieee80211_hw* ieee,
8 +void acx_config_interface(struct ieee80211_hw* ieee,
9 struct ieee80211_vif *vif,
10 - struct ieee80211_if_conf *conf);
11 + struct ieee80211_bss_conf *info,
12 + u32 changes);
13 int acx_net_config(struct ieee80211_hw* ieee, struct ieee80211_conf *conf);
14 int acx_net_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
15 int acx_net_conf_tx(struct ieee80211_hw* ieee, u16 queue,
16 --- a/common.c
17 +++ b/common.c
18 @@ -4370,9 +4370,10 @@ int acx_net_config(struct ieee80211_hw *
19 **
20 */
21
22 -extern int acx_config_interface(struct ieee80211_hw* ieee,
23 +void acx_config_interface(struct ieee80211_hw* ieee,
24 struct ieee80211_vif *vif,
25 - struct ieee80211_if_conf *conf)
26 + struct ieee80211_bss_conf *info,
27 + u32 changes)
28 {
29 acx_device_t *adev = ieee2adev(ieee);
30 unsigned long flags;
31 @@ -4388,22 +4389,22 @@ extern int acx_config_interface(struct i
32
33 if ((vif->type != NL80211_IFTYPE_MONITOR)
34 && (adev->vif == vif)) {
35 - if (conf->bssid)
36 + if (info->bssid)
37 {
38 - adev->interface.bssid = conf->bssid;
39 - MAC_COPY(adev->bssid,conf->bssid);
40 + adev->interface.bssid = info->bssid;
41 + MAC_COPY(adev->bssid, info->bssid);
42 }
43 }
44 if ((vif->type == NL80211_IFTYPE_AP)
45 && (adev->vif == vif)) {
46 - if ((conf->ssid_len > 0) && conf->ssid)
47 + if (info->bssid)
48 {
49 - adev->essid_len = conf->ssid_len;
50 - memcpy(adev->essid, conf->ssid, conf->ssid_len);
51 + adev->essid_len = ETH_ALEN;
52 + memcpy(adev->essid, info->bssid, ETH_ALEN);
53 SET_BIT(adev->set_mask, SET_TEMPLATES);
54 }
55 }
56 - if (conf->changed & IEEE80211_IFCC_BEACON)
57 + if (changes & BSS_CHANGED_BSSID)
58 {
59 adev->beacon_interval = DEFAULT_BEACON_INTERVAL;
60 adev->beacon_cache = ieee80211_beacon_get(ieee, vif);
61 @@ -4418,7 +4419,7 @@ extern int acx_config_interface(struct i
62 err = 0;
63 err_out:
64 FN_EXIT1(err);
65 - return err;
66 + return;
67 }
68
69 /**
70 --- a/pci.c
71 +++ b/pci.c
72 @@ -1469,7 +1469,7 @@ static const struct ieee80211_ops acxpci
73 .configure_filter = acx_i_set_multicast_list,
74 .stop = acxpci_e_close,
75 .config = acx_net_config,
76 - .config_interface = acx_config_interface,
77 + .bss_info_changed = acx_config_interface,
78 .set_key = acx_net_set_key,
79 .get_stats = acx_e_get_stats,
80 .get_tx_stats = acx_net_get_tx_stats,
81 --- a/usb.c
82 +++ b/usb.c
83 @@ -741,7 +741,7 @@ static const struct ieee80211_ops acxusb
84 .configure_filter = acx_i_set_multicast_list,
85 .stop = acxusb_e_close,
86 .config = acx_net_config,
87 - .config_interface = acx_config_interface,
88 + .bss_info_changed = acx_config_interface,
89 .set_key = acx_net_set_key,
90 .get_stats = acx_e_get_stats,
91 .get_tx_stats = acx_net_get_tx_stats,