1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-18 14:47:46 +01:00

madwifi: fix compile error on kernels without net_device api compatibility

SVN-Revision: 17219
This commit is contained in:
Felix Fietkau 2009-08-11 02:14:15 +00:00
parent 27da9d1984
commit a1c5477822
5 changed files with 19 additions and 11 deletions

@ -45,7 +45,15 @@ http://madwifi-project.org/changeset/4005
dev->tx_queue_len = ATH_TXBUF - ATH_TXBUF_MGT_RESERVED;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
netif_napi_add(dev, &sc->sc_napi, ath_rx_poll, 64);
@@ -12729,8 +12747,13 @@ ath_rcv_dev_event(struct notifier_block
@@ -1257,7 +1275,6 @@ ath_detach(struct net_device *dev)
ath_dynamic_sysctl_unregister(sc);
ATH_LOCK_DESTROY(sc);
ATH_HAL_LOCK_DESTROY(sc);
- dev->stop = NULL; /* prevent calling ath_stop again */
unregister_netdev(dev);
return 0;
}
@@ -12729,8 +12746,13 @@ ath_rcv_dev_event(struct notifier_block
struct net_device *dev = (struct net_device *)ptr;
struct ath_softc *sc = (struct ath_softc *)netdev_priv(dev);

@ -1,6 +1,6 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -3200,7 +3200,13 @@ ath_tx_startraw(struct net_device *dev,
@@ -3199,7 +3199,13 @@ ath_tx_startraw(struct net_device *dev,
struct ieee80211_frame *wh;
wh = (struct ieee80211_frame *)skb->data;
@ -14,7 +14,7 @@
rt = sc->sc_currates;
txrate = dot11_to_ratecode(sc, rt, ph->rate0);
power = ph->power > 63 ? 63 : ph->power;
@@ -3225,7 +3231,8 @@ ath_tx_startraw(struct net_device *dev,
@@ -3224,7 +3230,8 @@ ath_tx_startraw(struct net_device *dev,
rt = sc->sc_currates;
KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode));

@ -1,6 +1,6 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -11019,38 +11019,38 @@ enum {
@@ -11018,38 +11018,38 @@ enum {
* mirrored in /proc/sys.
*/
enum {

@ -1,6 +1,6 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -10474,11 +10474,11 @@ set_node_txpower(void *arg, struct ieee8
@@ -10473,11 +10473,11 @@ set_node_txpower(void *arg, struct ieee8
* XXX: this function needs some locking to avoid being called
* twice/interrupted. Returns the value actually stored. */
static u_int32_t
@ -16,7 +16,7 @@
return ath_get_clamped_maxtxpower(sc);
}
@@ -11029,6 +11029,7 @@ enum {
@@ -11028,6 +11028,7 @@ enum {
ATH_DEBUG,
ATH_TXANTENNA,
ATH_RXANTENNA,
@ -24,7 +24,7 @@
ATH_DIVERSITY,
ATH_TXINTRPERIOD,
ATH_FFTXQMIN,
@@ -11309,6 +11310,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
@@ -11308,6 +11309,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
ath_debug_global = (val & ATH_DEBUG_GLOBAL);
#endif
break;
@ -34,7 +34,7 @@
case ATH_TXANTENNA:
/*
* antenna can be:
@@ -11476,6 +11480,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
@@ -11475,6 +11479,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
case ATH_DEBUG:
val = sc->sc_debug | ath_debug_global;
break;
@ -44,7 +44,7 @@
case ATH_TXANTENNA:
val = sc->sc_txantenna;
break;
@@ -11617,6 +11624,12 @@ static const ctl_table ath_sysctl_templa
@@ -11616,6 +11623,12 @@ static const ctl_table ath_sysctl_templa
},
#endif
{ .ctl_name = CTL_AUTO,

@ -1,6 +1,6 @@
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
@@ -6642,10 +6642,8 @@ static void
@@ -6641,10 +6641,8 @@ static void
ath_recv_mgmt(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null,
struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf)
{
@ -12,7 +12,7 @@
struct ieee80211_node * ni = ni_or_null;
u_int64_t hw_tsf, beacon_tsf;
u_int32_t hw_tu, beacon_tu, intval;
@@ -6687,7 +6685,7 @@ ath_recv_mgmt(struct ieee80211vap * vap,
@@ -6686,7 +6684,7 @@ ath_recv_mgmt(struct ieee80211vap * vap,
}
if ((vap->iv_opmode == IEEE80211_M_IBSS) &&
(sc->sc_opmode == HAL_M_HOSTAP) &&