From f1bf8b70ce025c439610c02c26b892b7a8a60069 Mon Sep 17 00:00:00 2001 From: XazZ Date: Sat, 19 Jan 2008 01:08:00 +0100 Subject: [PATCH] compiles and should work under 2.6.24 now big thanks to waninkoko (he gave me the final hint) this just introduces two new warnings (can be ignored - the will be fixed later) --- acx_func.h | 7 ++++--- acx_struct.h | 3 +++ common.c | 31 +++++++++++++++++++++++++++---- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/acx_func.h b/acx_func.h index 42d8474..4949033 100644 --- a/acx_func.h +++ b/acx_func.h @@ -622,10 +622,11 @@ int acx_net_set_key(struct ieee80211_hw *hw, struct ieee80211_key_conf *key); #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) -int acx_config_interface(struct ieee80211_hw* ieee, int if_id, - struct ieee80211_if_conf *conf); +int acx_config_interface(struct ieee80211_hw* ieee, int if_id, + struct ieee80211_if_conf *conf); #else -static int acx_config_interface(struct ieee80211_hw* ieee, int if_id, +static int acx_config_interface(struct ieee80211_hw* ieee, + struct ieee80211_vif *vif, struct ieee80211_if_conf *conf); #endif int acx_net_config(struct ieee80211_hw* ieee, struct ieee80211_conf *conf); diff --git a/acx_struct.h b/acx_struct.h index 321860d..6fb4257 100644 --- a/acx_struct.h +++ b/acx_struct.h @@ -1197,6 +1197,9 @@ struct acx_device { struct ieee80211_hw *ieee; struct ieee80211_hw_mode modes[2]; struct ieee80211_rx_status rx_status; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) + struct ieee80211_vif *vif; +#endif /*** Power managment ***/ struct pm_dev *pm; /* PM crap */ diff --git a/common.c b/common.c index 9b15c8d..14d2b92 100644 --- a/common.c +++ b/common.c @@ -4396,10 +4396,6 @@ int acx_net_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) int acx_config_interface(struct ieee80211_hw* ieee, int if_id, struct ieee80211_if_conf *conf) -#else -static int acx_config_interface(struct ieee80211_hw* ieee, int if_id, - struct ieee80211_if_conf *conf) -#endif { acx_device_t *adev = ieee2adev(ieee); unsigned long flags; @@ -4422,6 +4418,33 @@ static int acx_config_interface(struct ieee80211_hw* ieee, int if_id, } if ((conf->type == IEEE80211_IF_TYPE_AP) && (adev->interface.if_id == if_id)) { +#else +static int acx_config_interface(struct ieee80211_hw* ieee, + struct ieee80211_vif *vif, + struct ieee80211_if_conf *conf) +{ + acx_device_t *adev = ieee2adev(ieee); + unsigned long flags; + int err = -ENODEV; + FN_ENTER; + if (!adev->interface.operating) + goto err_out; + acx_lock(adev, flags); + + if (adev->initialized) + acx_select_opmode(adev); + + if ((conf->type != IEEE80211_IF_TYPE_MNTR) + && (adev->vif == vif)) { + if (conf->bssid) + { + adev->interface.bssid = conf->bssid; + MAC_COPY(adev->bssid,conf->bssid); + } + } + if ((conf->type == IEEE80211_IF_TYPE_AP) + && (adev->vif == vif)) { +#endif if ((conf->ssid_len > 0) && conf->ssid) { adev->essid_len = conf->ssid_len; -- 2.11.4.GIT