madwifi: fix compilation against Linux 3.8
git-svn-id: svn://svn.openwrt.org/openwrt/packages@36010 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
41cbbda301
commit
01f172e4aa
@ -73,7 +73,6 @@
|
||||
- ieee80211_ref_node(SKB_CB(skb)->ni);
|
||||
- /* Unshare the node, decrementing users in the old skb */
|
||||
- skb = skb_unshare(skb, GFP_ATOMIC);
|
||||
- }
|
||||
+ need_headroom -= skb_headroom(skb);
|
||||
+ if (isff)
|
||||
+ need_tailroom -= skb_tailroom(skb2);
|
||||
@ -84,32 +83,42 @@
|
||||
+ need_headroom = 0;
|
||||
+ if (need_tailroom < 0)
|
||||
+ need_tailroom = 0;
|
||||
+
|
||||
+ if (skb_cloned(skb) || (need_headroom > 0) ||
|
||||
+ (!isff && (need_tailroom > 0))) {
|
||||
+
|
||||
+ if (pskb_expand_head(skb, need_headroom, need_tailroom, GFP_ATOMIC)) {
|
||||
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
|
||||
+ "%s: cannot expand storage (tail)\n", __func__);
|
||||
+ goto error;
|
||||
+ }
|
||||
}
|
||||
|
||||
-#ifdef ATH_SUPERG_FF
|
||||
- if (isff) {
|
||||
#ifdef ATH_SUPERG_FF
|
||||
if (isff) {
|
||||
- if (skb == NULL) {
|
||||
- IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
|
||||
- "%s: cannot unshare for encapsulation\n",
|
||||
- __func__);
|
||||
- vap->iv_stats.is_tx_nobuf++;
|
||||
- ieee80211_dev_kfree_skb(&skb2);
|
||||
+ if (skb_cloned(skb) || (need_headroom > 0) ||
|
||||
+ (!isff && (need_tailroom > 0))) {
|
||||
|
||||
-
|
||||
- return NULL;
|
||||
+ if (pskb_expand_head(skb, need_headroom, need_tailroom, GFP_ATOMIC)) {
|
||||
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
|
||||
+ "%s: cannot expand storage (tail)\n", __func__);
|
||||
+ goto error;
|
||||
}
|
||||
+ }
|
||||
- }
|
||||
+ inter_headroom -= skb_headroom(skb2);
|
||||
+ if (inter_headroom < 0)
|
||||
+ inter_headroom = 0;
|
||||
+ if ((skb_cloned(skb2) ||
|
||||
+ (inter_headroom > 0) || (need_tailroom > 0))) {
|
||||
|
||||
- /* first skb header */
|
||||
- if (skb_headroom(skb) < need_headroom) {
|
||||
- struct sk_buff *tmp = skb;
|
||||
- skb = skb_realloc_headroom(skb, need_headroom);
|
||||
- if (skb == NULL) {
|
||||
- IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
|
||||
+ if (pskb_expand_head(skb2, inter_headroom,
|
||||
+ need_tailroom, GFP_ATOMIC)) {
|
||||
IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
|
||||
- "%s: cannot expand storage (head1)\n",
|
||||
- __func__);
|
||||
- vap->iv_stats.is_tx_nobuf++;
|
||||
@ -121,14 +130,7 @@
|
||||
- /* NB: cb[] area was copied, but not next ptr. must do that
|
||||
- * prior to return on success. */
|
||||
- }
|
||||
+#ifdef ATH_SUPERG_FF
|
||||
+ if (isff) {
|
||||
+ inter_headroom -= skb_headroom(skb2);
|
||||
+ if (inter_headroom < 0)
|
||||
+ inter_headroom = 0;
|
||||
+ if ((skb_cloned(skb2) ||
|
||||
+ (inter_headroom > 0) || (need_tailroom > 0))) {
|
||||
|
||||
-
|
||||
- /* second skb with header and tail adjustments possible */
|
||||
- if (skb_tailroom(skb2) < need_tailroom) {
|
||||
- int n = 0;
|
||||
@ -137,9 +139,7 @@
|
||||
- if (pskb_expand_head(skb2, n,
|
||||
- need_tailroom - skb_tailroom(skb2), GFP_ATOMIC)) {
|
||||
- ieee80211_dev_kfree_skb(&skb2);
|
||||
+ if (pskb_expand_head(skb2, inter_headroom,
|
||||
+ need_tailroom, GFP_ATOMIC)) {
|
||||
IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
|
||||
- IEEE80211_DPRINTF(vap, IEEE80211_MSG_OUTPUT,
|
||||
- "%s: cannot expand storage (tail2)\n",
|
||||
- __func__);
|
||||
- vap->iv_stats.is_tx_nobuf++;
|
||||
@ -163,10 +163,10 @@
|
||||
- } else
|
||||
- ieee80211_skb_copy_noderef(tmp, skb);
|
||||
- ieee80211_dev_kfree_skb(&tmp);
|
||||
- }
|
||||
}
|
||||
- if (skb) {
|
||||
- skb->next = skb2;
|
||||
}
|
||||
- }
|
||||
- return skb;
|
||||
+ skb->next = skb2;
|
||||
}
|
||||
|
@ -1176,12 +1176,12 @@
|
||||
+ struct ieee80211_frame *wh;
|
||||
+ int len = sizeof(struct ieee80211_frame);
|
||||
+ int opmode = vap->iv_opmode;
|
||||
+
|
||||
|
||||
+ if ((type & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_DATA) {
|
||||
+ if ((opmode == IEEE80211_M_STA) &&
|
||||
+ (vap->iv_flags_ext & IEEE80211_FEXT_WDS))
|
||||
+ opmode = IEEE80211_M_WDS;
|
||||
|
||||
+
|
||||
+ if (opmode == IEEE80211_M_WDS)
|
||||
+ len = sizeof(struct ieee80211_frame_addr4);
|
||||
+ }
|
||||
|
@ -278,7 +278,7 @@
|
||||
bad4:
|
||||
--- a/ath/if_ath_pci.c
|
||||
+++ b/ath/if_ath_pci.c
|
||||
@@ -123,6 +123,33 @@ static u16 ath_devidmap[][2] = {
|
||||
@@ -125,6 +125,33 @@ static u16 ath_devidmap[][2] = {
|
||||
{ 0xff1a, 0x001a }
|
||||
};
|
||||
|
||||
@ -312,7 +312,7 @@
|
||||
static int
|
||||
ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
@@ -257,6 +284,10 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
@@ -259,6 +286,10 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
printk(KERN_INFO "%s: %s: %s: mem=0x%lx, irq=%d\n",
|
||||
dev_info, dev->name, athname ? athname : "Atheros ???", phymem, dev->irq);
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
||||
+ if (vap->iv_max_nodes > 0) {
|
||||
+ unsigned int active_nodes = 0;
|
||||
+ struct ieee80211_node *tni;
|
||||
|
||||
+
|
||||
+ IEEE80211_NODE_TABLE_LOCK_IRQ(&ic->ic_sta);
|
||||
+ TAILQ_FOREACH(tni, &ic->ic_sta.nt_node, ni_list) {
|
||||
+ if (tni->ni_vap != vap)
|
||||
@ -73,7 +73,7 @@
|
||||
+ active_nodes++;
|
||||
+ }
|
||||
+ IEEE80211_NODE_TABLE_UNLOCK_IRQ(&ic->ic_sta);
|
||||
+
|
||||
|
||||
+ if (active_nodes >= vap->iv_max_nodes) {
|
||||
+ /* too many nodes connected */
|
||||
+ ieee80211_node_leave(ni);
|
||||
|
@ -196,12 +196,10 @@
|
||||
static inline void ath_hal_beaconinit(struct ath_hal *ah, u_int32_t nexttbtt,
|
||||
u_int32_t intval)
|
||||
{
|
||||
@@ -839,6 +850,17 @@ static inline HAL_BOOL ath_hal_setslotti
|
||||
ath_hal_set_function(NULL);
|
||||
ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
|
||||
@@ -841,6 +852,17 @@ static inline HAL_BOOL ath_hal_setslotti
|
||||
return ret;
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
+static inline HAL_BOOL ath_hal_seteifstime(struct ath_hal *ah, u_int a1)
|
||||
+{
|
||||
+ HAL_BOOL ret;
|
||||
@ -211,9 +209,11 @@
|
||||
+ ath_hal_set_function(NULL);
|
||||
+ ATH_HAL_UNLOCK_IRQ(ah->ah_sc);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
+}
|
||||
+
|
||||
static inline void ath_hal_setledstate(struct ath_hal *ah, HAL_LED_STATE a1)
|
||||
{
|
||||
ATH_HAL_LOCK_IRQ(ah->ah_sc);
|
||||
--- a/ath/if_athvar.h
|
||||
+++ b/ath/if_athvar.h
|
||||
@@ -613,6 +613,15 @@ struct ath_rp {
|
||||
|
@ -842,7 +842,7 @@
|
||||
#endif /* #ifdef ATH_REVERSE_ENGINEERING */
|
||||
--- a/ath/if_ath_pci.c
|
||||
+++ b/ath/if_ath_pci.c
|
||||
@@ -226,7 +226,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
@@ -228,7 +228,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
printk(KERN_ERR "%s: no memory for device state\n", dev_info);
|
||||
goto bad2;
|
||||
}
|
||||
@ -851,7 +851,7 @@
|
||||
sc->aps_sc.sc_dev = dev;
|
||||
sc->aps_sc.sc_iobase = mem;
|
||||
|
||||
@@ -309,7 +309,7 @@ static void
|
||||
@@ -311,7 +311,7 @@ static void
|
||||
ath_pci_remove(struct pci_dev *pdev)
|
||||
{
|
||||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
@ -860,7 +860,7 @@
|
||||
|
||||
ath_detach(dev);
|
||||
if (dev->irq)
|
||||
@@ -327,7 +327,7 @@ ath_pci_suspend(struct pci_dev *pdev, pm
|
||||
@@ -329,7 +329,7 @@ ath_pci_suspend(struct pci_dev *pdev, pm
|
||||
struct net_device *dev = pci_get_drvdata(pdev);
|
||||
|
||||
ath_suspend(dev);
|
||||
@ -869,7 +869,7 @@
|
||||
pci_disable_device(pdev);
|
||||
return pci_set_power_state(pdev, PCI_D3hot);
|
||||
}
|
||||
@@ -344,7 +344,7 @@ ath_pci_resume(struct pci_dev *pdev)
|
||||
@@ -346,7 +346,7 @@ ath_pci_resume(struct pci_dev *pdev)
|
||||
return err;
|
||||
|
||||
/* XXX - Should this return nonzero on fail? */
|
||||
|
@ -14,7 +14,7 @@
|
||||
if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
|
||||
--- a/ath/if_ath_pci.c
|
||||
+++ b/ath/if_ath_pci.c
|
||||
@@ -236,6 +236,11 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
@@ -238,6 +238,11 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
*/
|
||||
sc->aps_sc.sc_invalid = 1;
|
||||
|
||||
|
@ -36,13 +36,13 @@
|
||||
struct ieee80211vap *vap = ni->ni_vap;
|
||||
- struct ether_header *eh = (struct ether_header *) skb->data;
|
||||
- int v_wme_ac = 0, d_wme_ac = 0;
|
||||
|
||||
-
|
||||
- /* default priority */
|
||||
- skb->priority = WME_AC_BE;
|
||||
-
|
||||
- if (!(ni->ni_flags & IEEE80211_NODE_QOS))
|
||||
- return 0;
|
||||
-
|
||||
|
||||
- /*
|
||||
- * If node has a vlan tag then all traffic
|
||||
- * to it must have a matching vlan id.
|
||||
|
@ -451,7 +451,7 @@
|
||||
module_exit(exit_ath_ahb);
|
||||
--- a/ath/if_ath_pci.c
|
||||
+++ b/ath/if_ath_pci.c
|
||||
@@ -415,11 +415,19 @@ MODULE_SUPPORTED_DEVICE("Atheros WLAN ca
|
||||
@@ -417,11 +417,19 @@ MODULE_SUPPORTED_DEVICE("Atheros WLAN ca
|
||||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
#endif
|
||||
|
||||
@ -471,7 +471,7 @@
|
||||
if (pci_register_driver(&ath_pci_driver) < 0) {
|
||||
printk(KERN_ERR "%s: No devices found, driver not installed.\n", dev_info);
|
||||
return (-ENODEV);
|
||||
@@ -434,6 +442,10 @@ exit_ath_pci(void)
|
||||
@@ -436,6 +444,10 @@ exit_ath_pci(void)
|
||||
{
|
||||
ath_sysctl_unregister();
|
||||
pci_unregister_driver(&ath_pci_driver);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/ath/if_ath_pci.c
|
||||
+++ b/ath/if_ath_pci.c
|
||||
@@ -264,6 +264,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
@@ -266,6 +266,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
/*
|
||||
* Auto-enable soft led processing for IBM cards and for
|
||||
* 5211 minipci cards. Users can also manually enable/disable
|
||||
@@ -279,6 +280,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
@@ -281,6 +282,7 @@ ath_pci_probe(struct pci_dev *pdev, cons
|
||||
sc->aps_sc.sc_softled = 1;
|
||||
sc->aps_sc.sc_ledpin = 1;
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
- { 0x168c, 0x0023, PCI_ANY_ID, PCI_ANY_ID },
|
||||
- { 0x168c, 0x0024, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ 0x168c, 0x9013, PCI_ANY_ID, PCI_ANY_ID }, /* sonicwall */
|
||||
{ 0x168c, 0xff16, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ 0x168c, 0xff1a, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ 0 }
|
||||
@@ -146,8 +144,6 @@ static const struct ath_hw_detect cards[
|
||||
@@ -148,8 +146,6 @@ static const struct ath_hw_detect cards[
|
||||
{ ubnt, "SR4C", 0x168c, 0x0013, 0x7777, 0x1004, 6 },
|
||||
{ ubnt, "SR5", 0x168c, 0x0013, 0x168c, 0x2042, 7 },
|
||||
{ ubnt, "SR9", 0x168c, 0x0013, 0x7777, 0x2009, 12 },
|
||||
|
@ -1,524 +1,601 @@
|
||||
--- a/kernelversion.c
|
||||
+++ b/kernelversion.c
|
||||
@@ -10,7 +10,11 @@
|
||||
|
||||
/* Linux 2.6.18+ uses <linux/utsrelease.h> */
|
||||
#ifndef UTS_RELEASE
|
||||
-#include <linux/utsrelease.h>
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
|
||||
+ #include <generated/utsrelease.h>
|
||||
+ #else
|
||||
+ #include <linux/utsrelease.h>
|
||||
+ #endif
|
||||
#endif
|
||||
|
||||
char *uts_release = UTS_RELEASE;
|
||||
--- a/ath/if_ath_pci.c
|
||||
+++ b/ath/if_ath_pci.c
|
||||
@@ -94,7 +94,7 @@ static char *dev_info = "ath_pci";
|
||||
* "new way" to do things, we may want to switch back to having
|
||||
* the HAL check them by defining a probe method.
|
||||
*/
|
||||
-static struct pci_device_id ath_pci_id_table[] __devinitdata = {
|
||||
+static struct pci_device_id ath_pci_id_table[] = {
|
||||
{ 0x168c, 0x0007, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ 0x168c, 0x0012, PCI_ANY_ID, PCI_ANY_ID },
|
||||
{ 0x168c, 0x0013, PCI_ANY_ID, PCI_ANY_ID },
|
||||
--- a/ath/if_ath.c
|
||||
+++ b/ath/if_ath.c
|
||||
@@ -11580,227 +11580,231 @@ static int mincalibrate = 1; /* once a
|
||||
@@ -11615,228 +11615,190 @@ static int mincalibrate = 1; /* once a
|
||||
static int maxint = 0x7fffffff; /* 32-bit big */
|
||||
|
||||
static const ctl_table ath_sysctl_template[] = {
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "dev_vendor",
|
||||
- .procname = "dev_vendor",
|
||||
+ { .procname = "dev_vendor",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_hwinfo,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
.strategy = &sysctl_string,
|
||||
+#endif
|
||||
- .strategy = &sysctl_string,
|
||||
.data = "N/A",
|
||||
.maxlen = 1,
|
||||
.extra2 = (void *)ATH_CARD_VENDOR,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "dev_name",
|
||||
- .procname = "dev_name",
|
||||
+ { .procname = "dev_name",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_hwinfo,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
.strategy = &sysctl_string,
|
||||
+#endif
|
||||
- .strategy = &sysctl_string,
|
||||
.data = "N/A",
|
||||
.maxlen = 1,
|
||||
.extra2 = (void *)ATH_CARD_NAME,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "slottime",
|
||||
- .procname = "slottime",
|
||||
+ { .procname = "slottime",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_SLOTTIME,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "acktimeout",
|
||||
- .procname = "acktimeout",
|
||||
+ { .procname = "acktimeout",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_ACKTIMEOUT,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "ctstimeout",
|
||||
- .procname = "ctstimeout",
|
||||
+ { .procname = "ctstimeout",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_CTSTIMEOUT,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "distance",
|
||||
- .procname = "distance",
|
||||
+ { .procname = "distance",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_DISTANCE,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "silent",
|
||||
- .procname = "silent",
|
||||
+ { .procname = "silent",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_SILENT,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "softled",
|
||||
- .procname = "softled",
|
||||
+ { .procname = "softled",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_SOFTLED,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "ledpin",
|
||||
- .procname = "ledpin",
|
||||
+ { .procname = "ledpin",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_LEDPIN,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "countrycode",
|
||||
- .procname = "countrycode",
|
||||
+ { .procname = "countrycode",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_COUNTRYCODE,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "outdoor",
|
||||
- .procname = "outdoor",
|
||||
+ { .procname = "outdoor",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_OUTDOOR,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "regdomain",
|
||||
- .procname = "regdomain",
|
||||
+ { .procname = "regdomain",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_REGDOMAIN,
|
||||
},
|
||||
#ifdef AR_DEBUG
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "debug",
|
||||
- .procname = "debug",
|
||||
+ { .procname = "debug",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_DEBUG,
|
||||
},
|
||||
#endif
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "poweroffset",
|
||||
- .procname = "poweroffset",
|
||||
+ { .procname = "poweroffset",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_POWEROFFSET,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "txantenna",
|
||||
- .procname = "txantenna",
|
||||
+ { .procname = "txantenna",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_TXANTENNA,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "rxantenna",
|
||||
- .procname = "rxantenna",
|
||||
+ { .procname = "rxantenna",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RXANTENNA,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "diversity",
|
||||
- .procname = "diversity",
|
||||
+ { .procname = "diversity",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_DIVERSITY,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "txintrperiod",
|
||||
- .procname = "txintrperiod",
|
||||
+ { .procname = "txintrperiod",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_TXINTRPERIOD,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "fftxqmin",
|
||||
- .procname = "fftxqmin",
|
||||
+ { .procname = "fftxqmin",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_FFTXQMIN,
|
||||
},
|
||||
#ifdef ATH_SUPERG_XR
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "xrpollperiod",
|
||||
- .procname = "xrpollperiod",
|
||||
+ { .procname = "xrpollperiod",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_XR_POLL_PERIOD,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "xrpollcount",
|
||||
- .procname = "xrpollcount",
|
||||
+ { .procname = "xrpollcount",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_XR_POLL_COUNT,
|
||||
},
|
||||
#endif
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "ackrate",
|
||||
- .procname = "ackrate",
|
||||
+ { .procname = "ackrate",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_ACKRATE,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "channelbw",
|
||||
- .procname = "channelbw",
|
||||
+ { .procname = "channelbw",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_CHANBW,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "rp",
|
||||
- .procname = "rp",
|
||||
+ { .procname = "rp",
|
||||
.mode = 0200,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RP,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "radar_print",
|
||||
- .procname = "radar_print",
|
||||
+ { .procname = "radar_print",
|
||||
.mode = 0200,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RP_PRINT,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "radar_print_all",
|
||||
- .procname = "radar_print_all",
|
||||
+ { .procname = "radar_print_all",
|
||||
.mode = 0200,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RP_PRINT_ALL,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "radar_dump",
|
||||
- .procname = "radar_dump",
|
||||
+ { .procname = "radar_dump",
|
||||
.mode = 0200,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RP_PRINT_MEM,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "radar_dump_all",
|
||||
- .procname = "radar_dump_all",
|
||||
+ { .procname = "radar_dump_all",
|
||||
.mode = 0200,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RP_PRINT_MEM_ALL,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "rp_flush",
|
||||
- .procname = "rp_flush",
|
||||
+ { .procname = "rp_flush",
|
||||
.mode = 0200,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RP_FLUSH,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "panic",
|
||||
- .procname = "panic",
|
||||
+ { .procname = "panic",
|
||||
.mode = 0200,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_PANIC,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "rp_ignored",
|
||||
- .procname = "rp_ignored",
|
||||
+ { .procname = "rp_ignored",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RP_IGNORED,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "radar_ignored",
|
||||
- .procname = "radar_ignored",
|
||||
+ { .procname = "radar_ignored",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_RADAR_IGNORED,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "intmit",
|
||||
- .procname = "intmit",
|
||||
+ { .procname = "intmit",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_INTMIT,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "noise_immunity",
|
||||
- .procname = "noise_immunity",
|
||||
+ { .procname = "noise_immunity",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_NOISE_IMMUNITY,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "ofdm_weak_det",
|
||||
- .procname = "ofdm_weak_det",
|
||||
+ { .procname = "ofdm_weak_det",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
.extra2 = (void *)ATH_OFDM_WEAK_DET,
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "cca_thresh",
|
||||
- .procname = "cca_thresh",
|
||||
+ { .procname = "cca_thresh",
|
||||
.mode = 0644,
|
||||
.proc_handler = ath_sysctl_halparam,
|
||||
@@ -11838,12 +11842,16 @@ ath_dynamic_sysctl_register(struct ath_s
|
||||
.extra2 = (void *)ATH_CCA_THRESH,
|
||||
@@ -11873,12 +11835,10 @@ ath_dynamic_sysctl_register(struct ath_s
|
||||
|
||||
/* setup the table */
|
||||
memset(sc->sc_sysctls, 0, space);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
sc->sc_sysctls[0].ctl_name = CTL_DEV;
|
||||
+#endif
|
||||
- sc->sc_sysctls[0].ctl_name = CTL_DEV;
|
||||
sc->sc_sysctls[0].procname = "dev";
|
||||
sc->sc_sysctls[0].mode = 0555;
|
||||
sc->sc_sysctls[0].child = &sc->sc_sysctls[2];
|
||||
/* [1] is NULL terminator */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
sc->sc_sysctls[2].ctl_name = CTL_AUTO;
|
||||
+#endif
|
||||
- sc->sc_sysctls[2].ctl_name = CTL_AUTO;
|
||||
sc->sc_sysctls[2].procname = dev_name;
|
||||
sc->sc_sysctls[2].mode = 0555;
|
||||
sc->sc_sysctls[2].child = &sc->sc_sysctls[4];
|
||||
@@ -11966,7 +11974,7 @@ ath_announce(struct net_device *dev)
|
||||
@@ -12001,23 +11961,20 @@ ath_announce(struct net_device *dev)
|
||||
*/
|
||||
static ctl_table ath_static_sysctls[] = {
|
||||
#ifdef AR_DEBUG
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "debug",
|
||||
- .procname = "debug",
|
||||
+ { .procname = "debug",
|
||||
.mode = 0644,
|
||||
.data = &ath_debug,
|
||||
@@ -11974,14 +11982,14 @@ static ctl_table ath_static_sysctls[] =
|
||||
.maxlen = sizeof(ath_debug),
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
#endif
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "xchanmode",
|
||||
- .procname = "xchanmode",
|
||||
+ { .procname = "xchanmode",
|
||||
.mode = 0444,
|
||||
.data = &ath_xchanmode,
|
||||
.maxlen = sizeof(ath_xchanmode),
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "calibrate",
|
||||
- .procname = "calibrate",
|
||||
+ { .procname = "calibrate",
|
||||
.mode = 0644,
|
||||
.data = &ath_calinterval,
|
||||
@@ -11993,14 +12001,14 @@ static ctl_table ath_static_sysctls[] =
|
||||
.maxlen = sizeof(ath_calinterval),
|
||||
@@ -12028,15 +11985,13 @@ static ctl_table ath_static_sysctls[] =
|
||||
{ 0 }
|
||||
};
|
||||
static ctl_table ath_ath_table[] = {
|
||||
- { .ctl_name = DEV_ATH,
|
||||
+ { CTLNAME(DEV_ATH)
|
||||
.procname = "ath",
|
||||
- .procname = "ath",
|
||||
+ { .procname = "ath",
|
||||
.mode = 0555,
|
||||
.child = ath_static_sysctls
|
||||
}, { 0 }
|
||||
};
|
||||
static ctl_table ath_root_table[] = {
|
||||
- { .ctl_name = CTL_DEV,
|
||||
+ { CTLNAME(CTL_DEV)
|
||||
.procname = "dev",
|
||||
- .procname = "dev",
|
||||
+ { .procname = "dev",
|
||||
.mode = 0555,
|
||||
.child = ath_ath_table
|
||||
--- a/ath/if_ath_ahb.h
|
||||
+++ b/ath/if_ath_ahb.h
|
||||
@@ -112,7 +112,11 @@
|
||||
do { (void) (start); (void) (size); } while (0)
|
||||
#endif
|
||||
}, { 0 }
|
||||
--- a/net80211/ieee80211_linux.c
|
||||
+++ b/net80211/ieee80211_linux.c
|
||||
@@ -699,40 +699,33 @@ IEEE80211_SYSCTL_DECL(ieee80211_sysctl_m
|
||||
|
||||
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
|
||||
+#define bus_dma_sync_single dma_sync_single_for_cpu
|
||||
+#else
|
||||
#define bus_dma_sync_single dma_sync_single
|
||||
+#endif
|
||||
#define bus_map_single dma_map_single
|
||||
#define bus_unmap_single dma_unmap_single
|
||||
#define bus_alloc_consistent(_hwdev, _sz, _hdma) \
|
||||
static const ctl_table ieee80211_sysctl_template[] = {
|
||||
#ifdef IEEE80211_DEBUG
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "debug",
|
||||
+ { .procname = "debug",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_debug
|
||||
},
|
||||
#endif
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "dev_type",
|
||||
+ { .procname = "dev_type",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_dev_type
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "monitor_nods_only",
|
||||
+ { .procname = "monitor_nods_only",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_nods_only
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "monitor_txf_len",
|
||||
+ { .procname = "monitor_txf_len",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_txf_len
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "monitor_phy_errors",
|
||||
+ { .procname = "monitor_phy_errors",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_phy_errors
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "monitor_crc_errors",
|
||||
+ { .procname = "monitor_crc_errors",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_crc_errors
|
||||
},
|
||||
/* NB: must be last entry before NULL */
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "%parent",
|
||||
+ { .procname = "%parent",
|
||||
.maxlen = IFNAMSIZ,
|
||||
.mode = 0444,
|
||||
.proc_handler = proc_dostring
|
||||
@@ -786,12 +779,10 @@ ieee80211_virtfs_latevattach(struct ieee
|
||||
|
||||
/* setup the table */
|
||||
memset(vap->iv_sysctls, 0, space);
|
||||
- vap->iv_sysctls[0].ctl_name = CTL_NET;
|
||||
vap->iv_sysctls[0].procname = "net";
|
||||
vap->iv_sysctls[0].mode = 0555;
|
||||
vap->iv_sysctls[0].child = &vap->iv_sysctls[2];
|
||||
/* [1] is NULL terminator */
|
||||
- vap->iv_sysctls[2].ctl_name = CTL_AUTO;
|
||||
vap->iv_sysctls[2].procname = devname; /* XXX bad idea? */
|
||||
vap->iv_sysctls[2].mode = 0555;
|
||||
vap->iv_sysctls[2].child = &vap->iv_sysctls[4];
|
||||
--- a/ath_hal/ah_os.c
|
||||
+++ b/ath_hal/ah_os.c
|
||||
@@ -518,7 +518,7 @@ EXPORT_SYMBOL(ath_hal_memcmp);
|
||||
@@ -518,50 +518,43 @@ EXPORT_SYMBOL(ath_hal_memcmp);
|
||||
|
||||
static ctl_table ath_hal_sysctls[] = {
|
||||
#ifdef AH_DEBUG
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "debug",
|
||||
- .procname = "debug",
|
||||
+ { .procname = "debug",
|
||||
.mode = 0644,
|
||||
.data = &ath_hal_debug,
|
||||
@@ -526,21 +526,21 @@ static ctl_table ath_hal_sysctls[] = {
|
||||
.maxlen = sizeof(ath_hal_debug),
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
#endif
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "dma_beacon_response_time",
|
||||
- .procname = "dma_beacon_response_time",
|
||||
+ { .procname = "dma_beacon_response_time",
|
||||
.data = &ath_hal_dma_beacon_response_time,
|
||||
.maxlen = sizeof(ath_hal_dma_beacon_response_time),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "sw_beacon_response_time",
|
||||
- .procname = "sw_beacon_response_time",
|
||||
+ { .procname = "sw_beacon_response_time",
|
||||
.mode = 0644,
|
||||
.data = &ath_hal_sw_beacon_response_time,
|
||||
.maxlen = sizeof(ath_hal_sw_beacon_response_time),
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "swba_backoff",
|
||||
- .procname = "swba_backoff",
|
||||
+ { .procname = "swba_backoff",
|
||||
.mode = 0644,
|
||||
.data = &ath_hal_additional_swba_backoff,
|
||||
@@ -548,19 +548,19 @@ static ctl_table ath_hal_sysctls[] = {
|
||||
.maxlen = sizeof(ath_hal_additional_swba_backoff),
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
#ifdef AH_DEBUG_ALQ
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "alq",
|
||||
- .procname = "alq",
|
||||
+ { .procname = "alq",
|
||||
.mode = 0644,
|
||||
.proc_handler = sysctl_hw_ath_hal_log
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "alq_size",
|
||||
- .procname = "alq_size",
|
||||
+ { .procname = "alq_size",
|
||||
.mode = 0644,
|
||||
.data = &ath_hal_alq_qsize,
|
||||
.maxlen = sizeof(ath_hal_alq_qsize),
|
||||
.proc_handler = proc_dointvec
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "alq_lost",
|
||||
- .procname = "alq_lost",
|
||||
+ { .procname = "alq_lost",
|
||||
.mode = 0644,
|
||||
.data = &ath_hal_alq_lost,
|
||||
@@ -571,21 +571,21 @@ static ctl_table ath_hal_sysctls[] = {
|
||||
.maxlen = sizeof(ath_hal_alq_lost),
|
||||
@@ -571,22 +564,19 @@ static ctl_table ath_hal_sysctls[] = {
|
||||
{ 0 }
|
||||
};
|
||||
static ctl_table ath_hal_table[] = {
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "hal",
|
||||
- .procname = "hal",
|
||||
+ { .procname = "hal",
|
||||
.mode = 0555,
|
||||
.child = ath_hal_sysctls
|
||||
}, { 0 }
|
||||
};
|
||||
static ctl_table ath_ath_table[] = {
|
||||
- { .ctl_name = DEV_ATH,
|
||||
+ { CTLNAME(DEV_ATH)
|
||||
.procname = "ath",
|
||||
- .procname = "ath",
|
||||
+ { .procname = "ath",
|
||||
.mode = 0555,
|
||||
.child = ath_hal_table
|
||||
}, { 0 }
|
||||
};
|
||||
static ctl_table ath_root_table[] = {
|
||||
- { .ctl_name = CTL_DEV,
|
||||
+ { CTLNAME(CTL_DEV)
|
||||
.procname = "dev",
|
||||
- .procname = "dev",
|
||||
+ { .procname = "dev",
|
||||
.mode = 0555,
|
||||
.child = ath_ath_table
|
||||
--- a/include/compat.h
|
||||
+++ b/include/compat.h
|
||||
@@ -193,6 +193,12 @@ static inline int timeval_compare(struct
|
||||
#define __skb_queue_after(_list, _old, _new) __skb_append(_old, _new, _list)
|
||||
#endif
|
||||
}, { 0 }
|
||||
--- a/ath_rate/amrr/amrr.c
|
||||
+++ b/ath_rate/amrr/amrr.c
|
||||
@@ -482,8 +482,7 @@ static int min_threshold = 1;
|
||||
*/
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
+#define CTLNAME(x) .ctl_name = x,
|
||||
+#else
|
||||
+#define CTLNAME(x)
|
||||
+#endif
|
||||
+
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _ATH_COMPAT_H_ */
|
||||
--- a/net80211/ieee80211_linux.c
|
||||
+++ b/net80211/ieee80211_linux.c
|
||||
@@ -699,39 +699,39 @@ IEEE80211_SYSCTL_DECL(ieee80211_sysctl_m
|
||||
|
||||
static const ctl_table ieee80211_sysctl_template[] = {
|
||||
#ifdef IEEE80211_DEBUG
|
||||
static ctl_table ath_rate_static_sysctls[] = {
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "debug",
|
||||
- .procname = "interval",
|
||||
+ { .procname = "interval",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_debug
|
||||
},
|
||||
#endif
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "dev_type",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_dev_type
|
||||
.data = &ath_rateinterval,
|
||||
.maxlen = sizeof(ath_rateinterval),
|
||||
@@ -491,8 +490,7 @@ static ctl_table ath_rate_static_sysctls
|
||||
.extra2 = &maxint,
|
||||
.proc_handler = proc_dointvec_minmax
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "monitor_nods_only",
|
||||
- .procname = "max_success_threshold",
|
||||
+ { .procname = "max_success_threshold",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_nods_only
|
||||
.data = &ath_rate_max_success_threshold,
|
||||
.maxlen = sizeof(ath_rate_max_success_threshold),
|
||||
@@ -500,8 +498,7 @@ static ctl_table ath_rate_static_sysctls
|
||||
.extra2 = &maxint,
|
||||
.proc_handler = proc_dointvec_minmax
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "monitor_txf_len",
|
||||
- .procname = "min_success_threshold",
|
||||
+ { .procname = "min_success_threshold",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_txf_len
|
||||
.data = &ath_rate_min_success_threshold,
|
||||
.maxlen = sizeof(ath_rate_min_success_threshold),
|
||||
@@ -512,22 +509,19 @@ static ctl_table ath_rate_static_sysctls
|
||||
{ 0 }
|
||||
};
|
||||
static ctl_table ath_rate_table[] = {
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "rate",
|
||||
+ { .procname = "rate",
|
||||
.mode = 0555,
|
||||
.child = ath_rate_static_sysctls
|
||||
}, { 0 }
|
||||
};
|
||||
static ctl_table ath_ath_table[] = {
|
||||
- { .ctl_name = DEV_ATH,
|
||||
- .procname = "ath",
|
||||
+ { .procname = "ath",
|
||||
.mode = 0555,
|
||||
.child = ath_rate_table
|
||||
}, { 0 }
|
||||
};
|
||||
static ctl_table ath_root_table[] = {
|
||||
- { .ctl_name = CTL_DEV,
|
||||
- .procname = "dev",
|
||||
+ { .procname = "dev",
|
||||
.mode = 0555,
|
||||
.child = ath_ath_table
|
||||
}, { 0 }
|
||||
--- a/ath_rate/onoe/onoe.c
|
||||
+++ b/ath_rate/onoe/onoe.c
|
||||
@@ -427,8 +427,7 @@ static int maxint = 0x7fffffff; /* 32-b
|
||||
* Static (i.e. global) sysctls.
|
||||
*/
|
||||
static ctl_table ath_rate_static_sysctls[] = {
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
- .procname = "interval",
|
||||
+ { .procname = "interval",
|
||||
.mode = 0644,
|
||||
.data = &ath_rateinterval,
|
||||
.maxlen = sizeof(ath_rateinterval),
|
||||
@@ -436,8 +435,7 @@ static ctl_table ath_rate_static_sysctls
|
||||
.extra2 = &maxint,
|
||||
.proc_handler = proc_dointvec_minmax
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "monitor_phy_errors",
|
||||
- .procname = "raise",
|
||||
+ { .procname = "raise",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_phy_errors
|
||||
.data = &ath_rate_raise,
|
||||
.maxlen = sizeof(ath_rate_raise),
|
||||
@@ -445,8 +443,7 @@ static ctl_table ath_rate_static_sysctls
|
||||
.extra2 = &maxpercent,
|
||||
.proc_handler = proc_dointvec_minmax
|
||||
},
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "monitor_crc_errors",
|
||||
- .procname = "raise_threshold",
|
||||
+ { .procname = "raise_threshold",
|
||||
.mode = 0644,
|
||||
.proc_handler = ieee80211_sysctl_monitor_crc_errors
|
||||
},
|
||||
/* NB: must be last entry before NULL */
|
||||
.data = &ath_rate_raise_threshold,
|
||||
.maxlen = sizeof(ath_rate_raise_threshold),
|
||||
@@ -455,22 +452,19 @@ static ctl_table ath_rate_static_sysctls
|
||||
{ 0 }
|
||||
};
|
||||
static ctl_table ath_rate_table[] = {
|
||||
- { .ctl_name = CTL_AUTO,
|
||||
+ { CTLNAME(CTL_AUTO)
|
||||
.procname = "%parent",
|
||||
.maxlen = IFNAMSIZ,
|
||||
.mode = 0444,
|
||||
@@ -786,12 +786,16 @@ ieee80211_virtfs_latevattach(struct ieee
|
||||
|
||||
/* setup the table */
|
||||
memset(vap->iv_sysctls, 0, space);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
vap->iv_sysctls[0].ctl_name = CTL_NET;
|
||||
+#endif
|
||||
vap->iv_sysctls[0].procname = "net";
|
||||
vap->iv_sysctls[0].mode = 0555;
|
||||
vap->iv_sysctls[0].child = &vap->iv_sysctls[2];
|
||||
/* [1] is NULL terminator */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
vap->iv_sysctls[2].ctl_name = CTL_AUTO;
|
||||
+#endif
|
||||
vap->iv_sysctls[2].procname = devname; /* XXX bad idea? */
|
||||
vap->iv_sysctls[2].mode = 0555;
|
||||
vap->iv_sysctls[2].child = &vap->iv_sysctls[4];
|
||||
- .procname = "rate",
|
||||
+ { .procname = "rate",
|
||||
.mode = 0555,
|
||||
.child = ath_rate_static_sysctls
|
||||
}, { 0 }
|
||||
};
|
||||
static ctl_table ath_ath_table[] = {
|
||||
- { .ctl_name = DEV_ATH,
|
||||
- .procname = "ath",
|
||||
+ { .procname = "ath",
|
||||
.mode = 0555,
|
||||
.child = ath_rate_table
|
||||
}, { 0 }
|
||||
};
|
||||
static ctl_table ath_root_table[] = {
|
||||
- { .ctl_name = CTL_DEV,
|
||||
- .procname = "dev",
|
||||
+ { .procname = "dev",
|
||||
.mode = 0555,
|
||||
.child = ath_ath_table
|
||||
}, { 0 }
|
Loading…
x
Reference in New Issue
Block a user