}
/*
-@@ -475,6 +483,9 @@ ccmp_encrypt(struct ieee80211_key *key,
+@@ -475,6 +483,9 @@ ccmp_encrypt(struct ieee80211_key *key,
uint8_t *mic, *pos;
u_int space;
ctx->cc_vap->iv_stats.is_crypto_ccmp++;
skb = skb0;
-@@ -589,6 +600,9 @@ ccmp_decrypt(struct ieee80211_key *key,
+@@ -589,6 +600,9 @@ ccmp_decrypt(struct ieee80211_key *key,
uint8_t *pos, *mic;
u_int space;
ic->ic_set_dfs_testmode = ath_set_dfs_testmode;
ic->ic_get_dfs_testmode = ath_get_dfs_testmode;
-@@ -1297,12 +1301,14 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1297,12 +1301,14 @@ ath_vap_create(struct ieee80211com *ic,
/* If no default VAP debug flags are passed, allow a few to
* transfer down from the driver to new VAPs so we can have load
* time debugging for VAPs too. */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
MODULE_PARM(ath_debug, "i");
#else
-@@ -465,8 +465,8 @@ static void ath_printrxbuf(const struct
+@@ -465,8 +465,8 @@ static void ath_printrxbuf(const struct
static void ath_printtxbuf(const struct ath_buf *, int);
#endif /* defined(AR_DEBUG) */
struct ieee80211com *ic = &sc->sc_ic;
int required = 0;
-@@ -366,6 +370,7 @@ static struct ath_rp *pulse_prev(struct
+@@ -366,6 +370,7 @@ static struct ath_rp *pulse_prev(struct
#define MR_FAIL_MIN_PERIOD 4
#define MR_FAIL_MAX_PERIOD 5
DPRINTF(sc, ATH_DEBUG_DOTHPULSES, "%s: ath_rp_record: "
--- a/ath_rate/minstrel/minstrel.c
+++ b/ath_rate/minstrel/minstrel.c
-@@ -931,7 +931,9 @@ ath_proc_read_nodes(struct ieee80211vap
+@@ -931,7 +931,9 @@ ath_proc_read_nodes(struct ieee80211vap
(struct ieee80211_node_table *) &vap->iv_ic->ic_sta;
unsigned int x = 0;
unsigned int this_tp, this_prob, this_eprob;
}
/*
-@@ -6360,15 +6426,25 @@ ath_setdefantenna(struct ath_softc *sc,
+@@ -6360,15 +6426,25 @@ ath_setdefantenna(struct ath_softc *sc,
sc->sc_rxotherant = 0;
}
* device was too busy */
if (ni_tmp != NULL) {
/* node reference was leaked */
-@@ -2322,8 +2322,8 @@ forward_mgmt_to_app(struct ieee80211vap
+@@ -2322,8 +2322,8 @@ forward_mgmt_to_app(struct ieee80211vap
skb1->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
ni_tmp = SKB_CB(skb1)->ni;
break;
case IEEE80211_M_WDS:
if (skb->len < sizeof(struct ieee80211_frame_addr4)) {
-@@ -3066,7 +3063,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3066,7 +3063,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
u_int8_t *frm, *efrm;
u_int8_t *ssid, *rates, *xrates, *suppchan, *wpa, *rsn, *wme, *ath;
u_int8_t rate;
u_int8_t qosinfo;
if (ni_or_null == NULL)
-@@ -3096,11 +3093,15 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3096,11 +3093,15 @@ ieee80211_recv_mgmt(struct ieee80211vap
* o station mode when associated (to collect state
* updates such as 802.11g slot time), or
* o adhoc mode (to discover neighbors)
vap->iv_stats.is_rx_mgtdiscard++;
return;
}
-@@ -3184,6 +3185,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3184,6 +3185,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
break;
}
scan.erp = frm[2];
break;
case IEEE80211_ELEMID_RSN:
scan.rsn = frm;
-@@ -3421,6 +3423,20 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3421,6 +3423,20 @@ ieee80211_recv_mgmt(struct ieee80211vap
ieee80211_bg_scan(vap);
return;
}
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -6457,6 +6457,7 @@ ath_rx_poll(struct net_device *dev, int
+@@ -6457,6 +6457,7 @@ ath_rx_poll(struct net_device *dev, int
int type;
u_int phyerr;
u_int processed = 0, early_stop = 0;
IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_INPUT,
ni->ni_macaddr, "data", "%s", "demic error");
IEEE80211_NODE_STAT(ni, rx_demicfail);
-@@ -4293,6 +4293,47 @@ ath_eth_type_trans(struct sk_buff *skb,
+@@ -4293,6 +4293,47 @@ ath_eth_type_trans(struct sk_buff *skb,
}
#endif
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -1354,7 +1354,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1354,7 +1354,7 @@ ath_vap_create(struct ieee80211com *ic,
TAILQ_FOREACH(v, &ic->ic_vaps, iv_next)
id_mask |= (1 << ATH_GET_VAP_ID(v->iv_myaddr));
/* if it is a mode change beacon for dynamic turbo case */
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -3431,9 +3431,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3431,9 +3431,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
/* Assume no ERP IE == 11b AP */
if ((!has_erp || (has_erp && (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) &&
!(ic->ic_flags & IEEE80211_F_USEPROT)) {
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -9792,7 +9792,9 @@ ath_getchannels(struct net_device *dev,
+@@ -9792,7 +9792,9 @@ ath_getchannels(struct net_device *dev,
/*
* Convert HAL channels to ieee80211 ones.
*/
for (i = 0; i < nchan; i++) {
HAL_CHANNEL *c = &chans[i];
struct ieee80211_channel *ichan = &ic->ic_channels[i];
-@@ -9819,6 +9821,7 @@ ath_getchannels(struct net_device *dev,
+@@ -9819,6 +9821,7 @@ ath_getchannels(struct net_device *dev,
ic->ic_chan_non_occupy[i].tv_sec = 0;
ic->ic_chan_non_occupy[i].tv_usec = 0;
IPRINTF(sc, "Channel %3d (%4d MHz) Max Tx Power %d dBm%s "
"[%d hw %d reg] Flags%s%s%s%s%s%s%s%s%s%s%s%s%"
"s%s%s%s%s%s%s%s%s%s%s%s\n",
-@@ -9907,6 +9910,7 @@ ath_getchannels(struct net_device *dev,
+@@ -9907,6 +9910,7 @@ ath_getchannels(struct net_device *dev,
(c->privFlags & 0x0080 ?
" PF & (1 << 7)" : "")
);
sc->sc_stats.ast_be_xmit++; /* XXX per-VAP? */
}
-@@ -5403,6 +5431,7 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5403,6 +5431,7 @@ ath_beacon_config(struct ath_softc *sc,
ath_hal_beacontimers(ah, &bs);
sc->sc_imask |= HAL_INT_BMISS;
ath_hal_intrset(ah, sc->sc_imask);
} else {
ath_hal_intrset(ah, 0);
if (reset_tsf)
-@@ -5414,8 +5443,11 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5414,8 +5443,11 @@ ath_beacon_config(struct ath_softc *sc,
*/
intval |= HAL_BEACON_ENA;
sc->sc_imask |= HAL_INT_SWBA;
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -950,6 +950,9 @@ ieee80211_input_all(struct ieee80211com
+@@ -950,6 +950,9 @@ ieee80211_input_all(struct ieee80211com
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
struct sk_buff *skb1;
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -1307,6 +1307,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1307,6 +1307,7 @@ ath_vap_create(struct ieee80211com *ic,
vap->iv_key_set = ath_key_set;
vap->iv_key_update_begin = ath_key_update_begin;
vap->iv_key_update_end = ath_key_update_end;
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -1308,6 +1308,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1308,6 +1308,7 @@ ath_vap_create(struct ieee80211com *ic,
vap->iv_key_update_begin = ath_key_update_begin;
vap->iv_key_update_end = ath_key_update_end;
vap->iv_maxrateindex = 0;
- 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);
+ 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++;
- /* 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;
- 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++;
- } else
- ieee80211_skb_copy_noderef(tmp, skb);
- ieee80211_dev_kfree_skb(&tmp);
-- }
+ }
- if (skb) {
- skb->next = skb2;
- }
+- }
- return skb;
+ skb->next = skb2;
}
* multiple segments.
--- a/ath_rate/minstrel/minstrel.c
+++ b/ath_rate/minstrel/minstrel.c
-@@ -333,15 +333,19 @@ ath_rate_findrate(struct ath_softc *sc,
+@@ -333,15 +333,19 @@ ath_rate_findrate(struct ath_softc *sc,
if (sn->static_rate_ndx >= 0) {
ndx = sn->static_rate_ndx;
} else {
TAILQ_INIT(&ic->ic_vaps);
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -3411,14 +3411,18 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3411,14 +3411,18 @@ ieee80211_recv_mgmt(struct ieee80211vap
IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) {
/* Assume no ERP IE == 11b AP */
return 0;
bad3:
ieee80211_ifdetach(ic);
-@@ -2428,6 +2431,43 @@ ath_chan2flags(struct ieee80211_channel
+@@ -2428,6 +2431,43 @@ ath_chan2flags(struct ieee80211_channel
return flags;
}
}
static __inline int
-@@ -3258,6 +3260,25 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3258,6 +3260,25 @@ ieee80211_recv_mgmt(struct ieee80211vap
/* record tsf of last beacon */
memcpy(ni->ni_tstamp.data, scan.tstamp,
sizeof(ni->ni_tstamp));
return ret;
--- a/net80211/ieee80211_wireless.c
+++ b/net80211/ieee80211_wireless.c
-@@ -514,8 +514,9 @@ ieee80211_ioctl_siwap(struct net_device
+@@ -514,8 +514,9 @@ ieee80211_ioctl_siwap(struct net_device
vap->iv_flags |= IEEE80211_F_DESBSSID;
IEEE80211_ADDR_COPY(vap->iv_des_bssid, &ap_addr->sa_data);
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -3400,12 +3400,17 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3400,12 +3400,17 @@ ieee80211_recv_mgmt(struct ieee80211vap
}
/* WDS/Repeater: re-schedule software beacon timer for
{ IEEE80211_PARAM_UAPSDINFO,
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -3261,6 +3261,19 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3261,6 +3261,19 @@ ieee80211_recv_mgmt(struct ieee80211vap
memcpy(ni->ni_tstamp.data, scan.tstamp,
sizeof(ni->ni_tstamp));
if (se->se_fails && (jiffies - se->se_lastfail) > STA_FAILS_AGE*HZ) {
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -3106,6 +3106,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3106,6 +3106,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
*/
IEEE80211_VERIFY_LENGTH(efrm - frm, 12);
memset(&scan, 0, sizeof(scan));
if (ic->ic_dev->flags & IFF_RUNNING) {
/* needs to disable hardware too */
-@@ -1271,8 +1269,12 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1271,8 +1269,12 @@ ath_vap_create(struct ieee80211com *ic,
} else
ic_opmode = opmode;
break;
/* permit multiple APs and/or WDS links */
/* XXX sta+ap for repeater/bridge application */
if ((sc->sc_nvaps != 0) && (ic->ic_opmode == IEEE80211_M_STA))
-@@ -1304,7 +1306,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1304,7 +1306,7 @@ ath_vap_create(struct ieee80211com *ic,
}
avp = dev->priv;
{
#define IEEE80211_C_OPMODE \
(IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | IEEE80211_C_AHDEMO | \
-@@ -510,9 +525,18 @@ ieee80211_vap_setup(struct ieee80211com
+@@ -510,9 +525,18 @@ ieee80211_vap_setup(struct ieee80211com
vap->iv_monitor_crc_errors = 0;
vap->iv_monitor_phy_errors = 0;
switch (cmd) {
case SIOCG80211STATS:
-@@ -5921,8 +5922,20 @@ ieee80211_ioctl(struct net_device *dev,
+@@ -5921,8 +5922,20 @@ ieee80211_ioctl(struct net_device *dev,
case SIOC80211IFDESTROY:
if (!capable(CAP_NET_ADMIN))
return -EPERM;
skb1 = skb;
skb = NULL;
}
-@@ -3084,8 +3133,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3084,8 +3133,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
(vap->iv_opmode == IEEE80211_M_STA && ni->ni_associd) ||
(vap->iv_opmode == IEEE80211_M_IBSS) ||
((subtype == IEEE80211_FC0_SUBTYPE_BEACON) &&
vap->iv_stats.is_rx_mgtdiscard++;
return;
}
-@@ -3471,13 +3519,56 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3471,13 +3519,56 @@ ieee80211_recv_mgmt(struct ieee80211vap
*/
if (ic->ic_flags & IEEE80211_F_SCAN) {
ieee80211_add_scan(vap, &scan, wh, subtype, rssi, rtsf);
} else {
/*
* Copy data from beacon to neighbor table.
-@@ -3490,6 +3581,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3490,6 +3581,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
IEEE80211_ADDR_COPY(ni->ni_bssid, wh->i_addr3);
memcpy(ni->ni_tstamp.data, scan.tstamp,
sizeof(ni->ni_tstamp));
/* calculate priority so drivers can find the TX queue */
if (ieee80211_classify(ni, skb)) {
IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT, ni,
-@@ -334,20 +335,33 @@ void ieee80211_parent_queue_xmit(struct
+@@ -334,20 +335,33 @@ void ieee80211_parent_queue_xmit(struct
* constructing a frame as it sets i_fc[1]; other bits can
* then be or'd in.
*/
+ 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);
+ }
}
}
EXPORT_SYMBOL(ieee80211_stop_running);
-@@ -1342,9 +1398,9 @@ ieee80211_new_state(struct ieee80211vap
+@@ -1342,9 +1398,9 @@ ieee80211_new_state(struct ieee80211vap
struct ieee80211com *ic = vap->iv_ic;
int rc;
vap->iv_devstats.tx_dropped++;
--- a/net80211/ieee80211_output.c
+++ b/net80211/ieee80211_output.c
-@@ -324,9 +324,10 @@ void ieee80211_parent_queue_xmit(struct
+@@ -324,9 +324,10 @@ void ieee80211_parent_queue_xmit(struct
/* Dispatch the packet to the parent device */
skb->dev = vap->iv_ic->ic_dev;
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -5486,6 +5486,9 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5486,6 +5486,9 @@ ath_beacon_config(struct ath_softc *sc,
ath_beacon_dturbo_config(vap, intval &
~(HAL_BEACON_RESET_TSF | HAL_BEACON_ENA));
#endif
/*
* Reset the hardware w/o losing operational state. This is
* basically a more efficient way of doing ath_stop, ath_init,
-@@ -5294,6 +5361,7 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5294,6 +5361,7 @@ ath_beacon_config(struct ath_softc *sc,
u_int64_t tsf, hw_tsf;
u_int32_t tsftu, hw_tsftu;
u_int32_t intval, nexttbtt = 0;
int reset_tsf = 0;
if (vap == NULL)
-@@ -5301,6 +5369,9 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5301,6 +5369,9 @@ ath_beacon_config(struct ath_softc *sc,
ni = vap->iv_bss;
hw_tsf = ath_hal_gettsf64(ah);
tsf = le64_to_cpu(ni->ni_tstamp.tsf);
hw_tsftu = hw_tsf >> 10;
-@@ -5490,15 +5561,27 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5490,15 +5561,27 @@ ath_beacon_config(struct ath_softc *sc,
<= ath_hal_sw_beacon_response_time)
nexttbtt += intval;
sc->sc_nexttbtt = nexttbtt;
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -3529,6 +3529,11 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3529,6 +3529,11 @@ ieee80211_recv_mgmt(struct ieee80211vap
if (ic->ic_flags & IEEE80211_F_SCAN) {
ieee80211_add_scan(vap, &scan, wh, subtype, rssi, rtsf);
}
_MOD_INC_USE(THIS_MODULE, return NULL);
osc = kmalloc(sizeof(struct minstrel_softc), GFP_ATOMIC);
-@@ -963,7 +949,7 @@ ath_proc_read_nodes(struct ieee80211vap
+@@ -963,7 +949,7 @@ ath_proc_read_nodes(struct ieee80211vap
p += sprintf(p, "out of room for node " MAC_FMT "\n\n", MAC_ADDR(ni->ni_macaddr));
break;
}
--- a/net80211/ieee80211_node.c
+++ b/net80211/ieee80211_node.c
-@@ -427,8 +427,8 @@ ieee80211_reset_bss(struct ieee80211vap
+@@ -427,8 +427,8 @@ ieee80211_reset_bss(struct ieee80211vap
__func__, ni, MAC_ADDR(vap->iv_myaddr));
KASSERT(ni != NULL, ("unable to setup inital BSS node"));
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -1260,7 +1260,10 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1260,7 +1260,10 @@ ath_vap_create(struct ieee80211com *ic,
case IEEE80211_M_IBSS:
if ((sc->sc_nvaps != 0) && (ic->ic_opmode == IEEE80211_M_STA))
return NULL;
break;
case IEEE80211_M_AHDEMO:
case IEEE80211_M_MONITOR:
-@@ -1455,7 +1458,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1455,7 +1458,7 @@ ath_vap_create(struct ieee80211com *ic,
* frames. Other modes carry over directly to the HAL.
*/
if (ic->ic_opmode == IEEE80211_M_AHDEMO)
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -1452,6 +1452,23 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1452,6 +1452,23 @@ ath_vap_create(struct ieee80211com *ic,
sc->sc_nstavaps++;
else if (opmode == IEEE80211_M_MONITOR)
sc->sc_nmonvaps++;
/* Allocate space for dynamically determined maximum VAP count */
sc->sc_bslot =
kmalloc(ath_maxvaps * sizeof(struct ieee80211vap*), GFP_KERNEL);
-@@ -1508,6 +1520,29 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1508,6 +1520,29 @@ ath_vap_create(struct ieee80211com *ic,
return vap;
}
#include <asm/io.h>
#include <asm/uaccess.h>
-@@ -181,12 +182,32 @@ exit_ath_wmac(u_int16_t wlanNum, struct
+@@ -181,12 +182,32 @@ exit_ath_wmac(u_int16_t wlanNum, struct
return 0;
}
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 }
};
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);
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -6669,6 +6669,7 @@ ath_setdefantenna(struct ath_softc *sc,
+@@ -6669,6 +6669,7 @@ ath_setdefantenna(struct ath_softc *sc,
struct ath_hal *ah = sc->sc_ah;
/* XXX block beacon interrupts */
return NULL;
}
-@@ -176,11 +183,11 @@ acl_add(struct ieee80211vap *vap, const
+@@ -176,11 +183,11 @@ acl_add(struct ieee80211vap *vap, const
return -ENOMEM;
}
FREE(new, M_80211_ACL);
IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL,
"ACL: add " MAC_FMT " failed, already present\n",
-@@ -191,7 +198,7 @@ acl_add(struct ieee80211vap *vap, const
+@@ -191,7 +198,7 @@ acl_add(struct ieee80211vap *vap, const
IEEE80211_ADDR_COPY(new->acl_macaddr, mac);
TAILQ_INSERT_TAIL(&as->as_list, new, acl_list);
LIST_INSERT_HEAD(&as->as_hash[hash], new, acl_hash);
/*
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -4020,7 +4020,26 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -4020,7 +4020,26 @@ ieee80211_recv_mgmt(struct ieee80211vap
vap->iv_stats.is_rx_assoc_norate++;
return;
}
+ 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)
+ 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);
sc->sc_curchan.channel = ic->ic_curchan->ic_freq;
sc->sc_curchan.channelFlags = ath_chan2flags(ic->ic_curchan);
if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) {
-@@ -2914,6 +2916,48 @@ ath_hw_check_atim(struct ath_softc *sc,
+@@ -2914,6 +2916,48 @@ ath_hw_check_atim(struct ath_softc *sc,
return 0;
}
#define IEEE80211_CHAN_MAX 255
--- a/net80211/ieee80211_scan_ap.c
+++ b/net80211/ieee80211_scan_ap.c
-@@ -417,6 +417,19 @@ pc_cmp_rssi(struct ap_state *as, struct
+@@ -417,6 +417,19 @@ pc_cmp_rssi(struct ap_state *as, struct
/* This function must be invoked with locks acquired */
static int
}
if (best != NULL) {
-@@ -599,6 +583,9 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -599,6 +583,9 @@ ap_end(struct ieee80211_scan_state *ss,
("wrong opmode %u", vap->iv_opmode));
ic = vap->iv_ic;
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -4443,7 +4443,9 @@ ath_eth_type_trans(struct sk_buff *skb,
+@@ -4443,7 +4443,9 @@ ath_eth_type_trans(struct sk_buff *skb,
if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN))
skb->pkt_type = PACKET_OTHERHOST;
if (TAILQ_NEXT(vap, iv_next) != NULL) {
skb1 = skb_copy(skb, GFP_ATOMIC);
if (skb1 == NULL) {
-@@ -950,8 +957,12 @@ ieee80211_input_all(struct ieee80211com
+@@ -950,8 +957,12 @@ ieee80211_input_all(struct ieee80211com
skb1 = skb;
skb = NULL;
}
!ni1->ni_subif &&
ni1 != vap->iv_bss) {
-@@ -3520,6 +3529,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3520,6 +3529,7 @@ ieee80211_recv_mgmt(struct ieee80211vap
(vap->iv_opmode == IEEE80211_M_WDS)) &&
(scan.capinfo & IEEE80211_CAPINFO_ESS))) {
struct ieee80211vap *avp = NULL;
int found = 0;
IEEE80211_LOCK_IRQ(vap->iv_ic);
-@@ -3553,10 +3563,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3553,10 +3563,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
ni->ni_associd |= 0xc000;
avp->iv_wdsnode = ieee80211_ref_node(ni);
IEEE80211_UNLOCK_IRQ(ic);
} else {
/*
* Copy data from beacon to neighbor table.
-@@ -3595,6 +3607,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3595,6 +3607,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
ni->ni_rssi = rssi;
ni->ni_rtsf = rtsf;
ni->ni_last_rx = jiffies;
(const struct ieee80211_frame_min *)skb->data);
if (ni == NULL) {
DPRINTF(sc, ATH_DEBUG_BEACON, "Dropping; node unknown.\n");
-@@ -6746,7 +6745,9 @@ ath_rx_poll(struct net_device *dev, int
+@@ -6746,7 +6745,9 @@ ath_rx_poll(struct net_device *dev, int
struct ath_desc *ds;
struct ath_rx_status *rs;
struct sk_buff *skb = NULL;
--- a/net80211/ieee80211_input.c
+++ b/net80211/ieee80211_input.c
-@@ -3621,6 +3621,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3621,6 +3621,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
vap->iv_stats.is_rx_mgtdiscard++;
return;
}
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -6734,10 +6734,10 @@ ath_rx_poll(struct net_device *dev, int
+@@ -6734,10 +6734,10 @@ ath_rx_poll(struct net_device *dev, int
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
struct ath_softc *sc = container_of(napi, struct ath_softc, sc_napi);
struct net_device *dev = sc->sc_dev;
/*
* Check if the MAC has multi-rate retry support.
* We do this by trying to setup a fake extended
-@@ -7568,7 +7576,7 @@ ath_txq_setup(struct ath_softc *sc, int
+@@ -7568,7 +7576,7 @@ ath_txq_setup(struct ath_softc *sc, int
if (qtype == HAL_TX_QUEUE_UAPSD)
qi.tqi_qflags = HAL_TXQ_TXDESCINT_ENABLE;
else
Please let us know if you think your name should be mentioned here!
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -3147,7 +3147,7 @@ ath_tx_startraw(struct net_device *dev,
+@@ -3147,7 +3147,7 @@ ath_tx_startraw(struct net_device *dev,
struct ath_softc *sc = dev->priv;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *)
}
-@@ -575,6 +583,7 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -575,6 +583,7 @@ ap_end(struct ieee80211_scan_state *ss,
struct ap_state *as = ss->ss_priv;
struct ieee80211_channel *bestchan = NULL;
struct ieee80211com *ic = NULL;
int res = 1;
SCAN_AP_LOCK_IRQ(as);
-@@ -586,8 +595,11 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -586,8 +595,11 @@ ap_end(struct ieee80211_scan_state *ss,
/* record stats for the channel that was scanned last */
ic->ic_set_channel(ic);
if (ss->ss_last > 0) {
/* no suitable channel, should not happen */
printk(KERN_ERR "%s: %s: no suitable channel! "
-@@ -606,6 +618,7 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -606,6 +618,7 @@ ap_end(struct ieee80211_scan_state *ss,
bestchan->ic_freq, bestchan->ic_flags &
~IEEE80211_CHAN_TURBO)) == NULL) {
/* should never happen ?? */
SCAN_AP_UNLOCK_IRQ_EARLY(as);
return 0;
}
-@@ -618,6 +631,9 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -618,6 +631,9 @@ ap_end(struct ieee80211_scan_state *ss,
as->as_action = action;
as->as_selbss = se;
static void ath_poll_disable(struct net_device *dev);
static void ath_poll_enable(struct net_device *dev);
-@@ -3168,7 +3167,7 @@ ath_tx_startraw(struct net_device *dev,
+@@ -3168,7 +3167,7 @@ ath_tx_startraw(struct net_device *dev,
try0 = ph->try0;
rt = sc->sc_currates;
txrate = dot11_to_ratecode(sc, rt, ph->rate0);
static int beacon_cal = 1;
static const struct ath_hw_detect generic_hw_info = {
-@@ -1525,6 +1526,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1525,6 +1526,7 @@ ath_vap_create(struct ieee80211com *ic,
ath_hal_intrset(ah, sc->sc_imask);
}
if (bf->bf_skb->priority == WME_AC_VO ||
bf->bf_skb->priority == WME_AC_VI)
ni->ni_ic->ic_wme.wme_hipri_traffic++;
-@@ -10111,6 +10124,7 @@ ath_newassoc(struct ieee80211_node *ni,
+@@ -10111,6 +10124,7 @@ ath_newassoc(struct ieee80211_node *ni,
struct ath_softc *sc = ic->ic_dev->priv;
sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew);
if (bfaddr != 0) {
/*
* Stop any current DMA and put the new frame(s) on the queue.
-@@ -6734,9 +6708,8 @@ ath_setdefantenna(struct ath_softc *sc,
+@@ -6734,9 +6708,8 @@ ath_setdefantenna(struct ath_softc *sc,
{
struct ath_hal *ah = sc->sc_ah;
static void ath_updateslot(struct net_device *);
static int ath_beaconq_setup(struct ath_softc *);
static int ath_beacon_alloc(struct ath_softc *, struct ieee80211_node *);
-@@ -240,7 +239,7 @@ static void ath_setup_stationkey(struct
+@@ -240,7 +239,7 @@ static void ath_setup_stationkey(struct
static void ath_setup_stationwepkey(struct ieee80211_node *);
static void ath_setup_keycacheslot(struct ath_softc *, struct ieee80211_node *);
static void ath_newassoc(struct ieee80211_node *, int);
ath_rate_setup(dev, mode);
ath_setcurmode(sc, mode);
-@@ -10124,8 +10142,7 @@ ath_newassoc(struct ieee80211_node *ni,
+@@ -10124,8 +10142,7 @@ ath_newassoc(struct ieee80211_node *ni,
}
static int
{
struct ath_softc *sc = dev->priv;
struct ieee80211com *ic = &sc->sc_ic;
-@@ -10139,17 +10156,31 @@ ath_getchannels(struct net_device *dev,
+@@ -10139,17 +10156,31 @@ ath_getchannels(struct net_device *dev,
EPRINTF(sc, "Insufficient memory for channel table!\n");
return -ENOMEM;
}
.procname = "rp",
.mode = 0200,
.proc_handler = ath_sysctl_halparam,
-@@ -11669,13 +11801,6 @@ static ctl_table ath_static_sysctls[] =
+@@ -11669,13 +11801,6 @@ static ctl_table ath_static_sysctls[] =
},
#endif
{ .ctl_name = CTL_AUTO,
.procname = "maxvaps",
.mode = 0444,
.data = &ath_maxvaps,
-@@ -11683,13 +11808,6 @@ static ctl_table ath_static_sysctls[] =
+@@ -11683,13 +11808,6 @@ static ctl_table ath_static_sysctls[] =
.proc_handler = proc_dointvec
},
{ .ctl_name = CTL_AUTO,
nrs = &ni->ni_rates;
fixedrate = IEEE80211_FIXED_RATE_NONE;
for (i = 0; i < nrs->rs_nrates;) {
-@@ -1407,6 +1407,7 @@ ieee80211_new_state(struct ieee80211vap
+@@ -1407,6 +1407,7 @@ ieee80211_new_state(struct ieee80211vap
IEEE80211_VAPS_UNLOCK_IRQ(ic);
return rc;
}
return best;
}
-@@ -609,6 +611,7 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -609,6 +611,7 @@ ap_end(struct ieee80211_scan_state *ss,
res = 1; /* Do NOT restart scan */
} else {
struct ieee80211_scan_entry se;
/* XXX: notify all VAPs? */
/* if this is a dynamic turbo frequency , start with normal
* mode first */
-@@ -623,6 +626,11 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -623,6 +626,11 @@ ap_end(struct ieee80211_scan_state *ss,
return 0;
}
}
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;
+ 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 {
{
--- a/ath_rate/sample/sample.c
+++ b/ath_rate/sample/sample.c
-@@ -137,92 +137,6 @@ rate_to_ndx(struct sample_node *sn, int
+@@ -137,92 +137,6 @@ rate_to_ndx(struct sample_node *sn, int
return -1;
}
/* don't use a bit-rate that has been failing */
if (sn->stats[size_bin][x].successive_failures > 3)
continue;
-@@ -234,10 +230,6 @@ pick_sample_ndx(struct sample_node *sn,
+@@ -234,10 +230,6 @@ pick_sample_ndx(struct sample_node *sn,
if (sn->rates[ndx].rate > 22 && ndx > current_ndx + 2)
continue;
struct ath_hal *ah = sc->sc_ah;
struct net_device *dev;
struct ath_vap *avp;
-@@ -1344,7 +1344,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1344,7 +1344,7 @@ ath_vap_create(struct ieee80211com *ic,
return NULL;
}
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
struct ieee80211_channel *c;
-@@ -3164,7 +3164,7 @@ dot11_to_ratecode(struct ath_softc *sc,
+@@ -3164,7 +3164,7 @@ dot11_to_ratecode(struct ath_softc *sc,
static int
ath_tx_startraw(struct net_device *dev, struct ath_buf *bf, struct sk_buff *skb)
{
#ifdef AR_DEBUG
struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data;
#endif
-@@ -6780,7 +6780,7 @@ ath_rx_poll(struct net_device *dev, int
+@@ -6780,7 +6780,7 @@ ath_rx_poll(struct net_device *dev, int
struct net_device *dev = sc->sc_dev;
int rx_limit = budget;
#else
ieee80211_keyix_t keyix;
keyix = ath_key_alloc(vap, &ni->ni_ucastkey);
-@@ -10177,7 +10177,7 @@ ath_newassoc(struct ieee80211_node *ni,
+@@ -10177,7 +10177,7 @@ ath_newassoc(struct ieee80211_node *ni,
{
struct ieee80211com *ic = ni->ni_ic;
struct ieee80211vap *vap = ni->ni_vap;
sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew);
ath_wprobe_node_join(ni->ni_vap, ni);
-@@ -10208,7 +10208,7 @@ ath_newassoc(struct ieee80211_node *ni,
+@@ -10208,7 +10208,7 @@ ath_newassoc(struct ieee80211_node *ni,
static int
ath_getchannels(struct net_device *dev)
{
if (sc->sc_txcont_rate != new_rate) {
/* NOTE: This value is sanity checked and dropped down to
* closest rate in txcont_on. */
-@@ -12539,7 +12539,7 @@ ath_set_txcont_rate(struct ieee80211com
+@@ -12539,7 +12539,7 @@ ath_set_txcont_rate(struct ieee80211com
ath_get_txcont_rate(struct ieee80211com *ic)
{
struct net_device *dev = ic->ic_dev;
ath_hal_dump_map(sc->sc_ah);
return 0;
}
-@@ -12724,7 +12724,7 @@ ath_rcv_dev_event(struct notifier_block
+@@ -12724,7 +12724,7 @@ ath_rcv_dev_event(struct notifier_block
void *ptr)
{
struct net_device *dev = (struct net_device *)ptr;
#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;
}
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);
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);
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? */
}
}
-@@ -822,7 +822,7 @@ ath_proc_read_nodes(struct ieee80211vap
+@@ -822,7 +822,7 @@ ath_proc_read_nodes(struct ieee80211vap
unsigned int x = 0;
unsigned int this_tp, this_prob, this_eprob;
#ifdef AR_DEBUG
#define skb_tail_pointer(_skb) ((_skb)->tail)
--- a/net80211/ieee80211.c
+++ b/net80211/ieee80211.c
-@@ -458,7 +458,7 @@ ieee80211_vap_setup(struct ieee80211com
+@@ -458,7 +458,7 @@ ieee80211_vap_setup(struct ieee80211com
#define IEEE80211_C_OPMODE \
(IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | IEEE80211_C_AHDEMO | \
IEEE80211_C_MONITOR)
struct ieee80211vap *vap;
struct ifmedia_entry *ime = ic->ic_media.ifm_cur;
enum ieee80211_phymode newphymode;
-@@ -1511,7 +1511,7 @@ checkrate(struct ieee80211com *ic, enum
+@@ -1511,7 +1511,7 @@ checkrate(struct ieee80211com *ic, enum
int
ieee80211_media_change(struct net_device *dev)
{
struct ieee80211com *ic = vap->iv_ic;
params[0] = ic->ic_dump_hal_map(ic);
return 0;
-@@ -1545,7 +1545,7 @@ ieee80211_ioctl_radar(struct net_device
+@@ -1545,7 +1545,7 @@ ieee80211_ioctl_radar(struct net_device
void *w, char *extra)
{
int *params = (int*) extra;
struct ieee80211com *ic = vap->iv_ic;
struct ifreq ifr;
char s[6]; /* big enough for ``11adt'' */
-@@ -2222,10 +2222,10 @@ ieee80211_setathcap(struct ieee80211vap
+@@ -2222,10 +2222,10 @@ ieee80211_setathcap(struct ieee80211vap
static int
ieee80211_set_turbo(struct net_device *dev, int flag)
{
struct ieee80211com *ic = vap->iv_ic;
struct ieee80211_node *ni;
u_int8_t macaddr[IEEE80211_ADDR_LEN];
-@@ -4428,7 +4428,7 @@ get_scan_result(void *arg, const struct
+@@ -4428,7 +4428,7 @@ get_scan_result(void *arg, const struct
static int
ieee80211_ioctl_getscanresults(struct net_device *dev, struct iwreq *iwr)
{
unregister_netdev(dev);
return 0;
}
-@@ -12732,8 +12749,13 @@ ath_rcv_dev_event(struct notifier_block
+@@ -12732,8 +12749,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);
int
ieee80211_vap_setup(struct ieee80211com *ic, struct net_device *dev,
const char *name, int opmode, int flags, struct ieee80211vap *master)
-@@ -471,16 +483,21 @@ ieee80211_vap_setup(struct ieee80211com
+@@ -471,16 +483,21 @@ ieee80211_vap_setup(struct ieee80211com
} else
strncpy(dev->name, name, sizeof(dev->name));
}
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;
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -3199,7 +3199,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;
rt = sc->sc_currates;
txrate = dot11_to_ratecode(sc, rt, ph->rate0);
power = ph->power > 63 ? 63 : ph->power;
-@@ -3224,7 +3230,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));
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.
if (dir != IEEE80211_FC1_DIR_NODS) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY,
wh, "data", "invalid dir 0x%x", dir);
-@@ -3558,6 +3563,11 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3558,6 +3563,11 @@ ieee80211_recv_mgmt(struct ieee80211vap
} else if ((vap->iv_opmode == IEEE80211_M_WDS) && vap->iv_wdsnode) {
found = 1;
ni = ni_or_null = vap->iv_wdsnode;
}
IEEE80211_UNLOCK_IRQ(vap->iv_ic);
-@@ -3686,19 +3696,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3686,19 +3696,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
vap->iv_stats.is_rx_ssidmismatch++; /*XXX*/
return;
}
{
--- a/net80211/ieee80211_crypto_ccmp.c
+++ b/net80211/ieee80211_crypto_ccmp.c
-@@ -686,6 +686,8 @@ ccmp_decrypt(struct ieee80211_key *key,
+@@ -686,6 +686,8 @@ ccmp_decrypt(struct ieee80211_key *key,
}
#undef CCMP_DECRYPT
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
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);
--- a/ath/if_ath.c
+++ b/ath/if_ath.c
-@@ -160,7 +160,7 @@ static int ath_check_beacon_done(struct
+@@ -160,7 +160,7 @@ static int ath_check_beacon_done(struct
static void ath_beacon_send(struct ath_softc *, int *, uint64_t hw_tsf);
static void ath_beacon_return(struct ath_softc *, struct ath_buf *);
static void ath_beacon_free(struct ath_softc *);
if (xchanmode != -1)
ath_xchanmode = xchanmode;
error = ath_getchannels(dev);
-@@ -1349,12 +1337,6 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1349,12 +1337,6 @@ ath_vap_create(struct ieee80211com *ic,
return NULL;
}
dev = alloc_etherdev(sizeof(struct ath_vap) + sc->sc_rc->arc_vap_space);
if (dev == NULL) {
/* XXX msg */
-@@ -1424,7 +1406,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1424,7 +1406,7 @@ ath_vap_create(struct ieee80211com *ic,
TAILQ_FOREACH(v, &ic->ic_vaps, iv_next)
id_mask |= (1 << ATH_GET_VAP_ID(v->iv_myaddr));
/* get the first available slot */
if ((id_mask & (1 << id)) == 0) {
ATH_SET_VAP_BSSID(vap->iv_myaddr, id);
-@@ -1451,11 +1433,11 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1451,11 +1433,11 @@ ath_vap_create(struct ieee80211com *ic,
/* Assign the VAP to a beacon xmit slot. As
* above, this cannot fail to find one. */
avp->av_bslot = 0;
sc->sc_bslot[slot+1] == NULL) {
avp->av_bslot = slot + 1;
break;
-@@ -1463,8 +1445,11 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1463,8 +1445,11 @@ ath_vap_create(struct ieee80211com *ic,
avp->av_bslot = slot;
/* NB: keep looking for a double slot */
}
sc->sc_bslot[avp->av_bslot] = vap;
sc->sc_nbcnvaps++;
-@@ -1475,15 +1460,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1475,15 +1460,7 @@ ath_vap_create(struct ieee80211com *ic,
* of staggered beacons.
*/
/* XXX check for beacon interval too small */
}
DPRINTF(sc, ATH_DEBUG_BEACON, "sc->sc_stagbeacons %sabled\n",
(sc->sc_stagbeacons ? "en" : "dis"));
-@@ -1553,7 +1530,7 @@ ath_vap_create(struct ieee80211com *ic,
+@@ -1553,7 +1530,7 @@ ath_vap_create(struct ieee80211com *ic,
if (ath_startrecv(sc) != 0) /* restart recv */
EPRINTF(sc, "Unable to start receive logic.\n");
if (sc->sc_beacons)
{
struct ieee80211com *ic = &sc->sc_ic;
struct ath_hal *ah = sc->sc_ah;
-@@ -5553,7 +5530,7 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5553,7 +5530,7 @@ ath_beacon_config(struct ath_softc *sc,
/* We should reset hw TSF only once, so we increment
* ni_tstamp.tsf to avoid resetting the hw TSF multiple
* times */
reset_tsf = 1;
ni->ni_tstamp.tsf = cpu_to_le64(1);
}
-@@ -5567,7 +5544,7 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5567,7 +5544,7 @@ ath_beacon_config(struct ath_softc *sc,
/* NB: the beacon interval is kept internally in TUs */
intval = ic->ic_lintval & HAL_BEACON_PERIOD;
if (sc->sc_stagbeacons)
if ((sc->sc_nostabeacons) &&
(vap->iv_opmode == IEEE80211_M_HOSTAP))
reset_tsf = 1;
-@@ -5583,31 +5560,24 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5583,31 +5560,24 @@ ath_beacon_config(struct ath_softc *sc,
* time */
nexttbtt = intval;
} else if (intval) { /* NB: can be 0 for monitor mode */
}
}
-@@ -5730,9 +5700,6 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5730,9 +5700,6 @@ ath_beacon_config(struct ath_softc *sc,
ath_beacon_dturbo_config(vap, intval &
~(HAL_BEACON_RESET_TSF | HAL_BEACON_ENA));
#endif
.procname = "regdomain",
.mode = 0644,
.proc_handler = ath_sysctl_halparam,
-@@ -11928,13 +11883,6 @@ static ctl_table ath_static_sysctls[] =
+@@ -11928,13 +11883,6 @@ static ctl_table ath_static_sysctls[] =
},
#endif
{ .ctl_name = CTL_AUTO,
}
}
iwspy_event(vap, ni, rssi);
-@@ -3553,8 +3546,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3553,8 +3546,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
(((vap->iv_opmode == IEEE80211_M_HOSTAP) ||
(vap->iv_opmode == IEEE80211_M_WDS)) &&
(scan.capinfo & IEEE80211_CAPINFO_ESS))) {
int found = 0;
IEEE80211_LOCK_IRQ(vap->iv_ic);
-@@ -3570,14 +3563,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3570,14 +3563,12 @@ ieee80211_recv_mgmt(struct ieee80211vap
}
}
if (found)
found = 1;
}
IEEE80211_UNLOCK_IRQ(vap->iv_ic);
-@@ -3585,20 +3576,21 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3585,20 +3576,21 @@ ieee80211_recv_mgmt(struct ieee80211vap
if (!found)
break;
} else {
/*
* Copy data from beacon to neighbor table.
-@@ -3606,39 +3598,38 @@ ieee80211_recv_mgmt(struct ieee80211vap
+@@ -3606,39 +3598,38 @@ ieee80211_recv_mgmt(struct ieee80211vap
* ieee80211_add_neighbor(), so we just copy
* everything over to be safe.
*/
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,52))
-@@ -204,6 +202,11 @@ ath_rate_findrate(struct ath_softc *sc,
+@@ -204,6 +202,11 @@ ath_rate_findrate(struct ath_softc *sc,
unsigned int ndx, offset;
int mrr;
/*
* Configure the beacon and sleep timers.
*
-@@ -5523,6 +5543,7 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5523,6 +5543,7 @@ ath_beacon_config(struct ath_softc *sc,
if (vap == NULL)
vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */
ni = vap->iv_bss;
/* TSF calculation is timing critical - we don't want to be interrupted here */
-@@ -5699,6 +5720,9 @@ ath_beacon_config(struct ath_softc *sc,
+@@ -5699,6 +5720,9 @@ ath_beacon_config(struct ath_softc *sc,
sc->sc_imask |= HAL_INT_SWBA;
ath_set_beacon_cal(sc, 1);
ath_beaconq_config(sc);
+++ /dev/null
---- 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.c
-+++ b/ath/if_ath.c
-@@ -11580,227 +11580,231 @@ 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",
- .mode = 0644,
- .proc_handler = ath_sysctl_hwinfo,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- .strategy = &sysctl_string,
-+#endif
- .data = "N/A",
- .maxlen = 1,
- .extra2 = (void *)ATH_CARD_VENDOR,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "dev_name",
- .mode = 0644,
- .proc_handler = ath_sysctl_hwinfo,
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
- .strategy = &sysctl_string,
-+#endif
- .data = "N/A",
- .maxlen = 1,
- .extra2 = (void *)ATH_CARD_NAME,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "slottime",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_SLOTTIME,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "acktimeout",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_ACKTIMEOUT,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "ctstimeout",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_CTSTIMEOUT,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "distance",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_DISTANCE,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "silent",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_SILENT,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "softled",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_SOFTLED,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "ledpin",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_LEDPIN,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "countrycode",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_COUNTRYCODE,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "outdoor",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_OUTDOOR,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_DEBUG,
- },
- #endif
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "poweroffset",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_POWEROFFSET,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "txantenna",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_TXANTENNA,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "rxantenna",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_RXANTENNA,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "diversity",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_DIVERSITY,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "txintrperiod",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_TXINTRPERIOD,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_XR_POLL_PERIOD,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_ACKRATE,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "channelbw",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_CHANBW,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "rp",
- .mode = 0200,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_RP,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0200,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_RP_PRINT_ALL,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0200,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_RP_PRINT_MEM_ALL,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "rp_flush",
- .mode = 0200,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_RP_FLUSH,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "panic",
- .mode = 0200,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_PANIC,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_RADAR_IGNORED,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "intmit",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_INTMIT,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
- .extra2 = (void *)ATH_OFDM_WEAK_DET,
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "cca_thresh",
- .mode = 0644,
- .proc_handler = ath_sysctl_halparam,
-@@ -11838,12 +11842,16 @@ 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].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].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)
- */
- static ctl_table ath_static_sysctls[] = {
- #ifdef AR_DEBUG
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "debug",
- .mode = 0644,
- .data = &ath_debug,
-@@ -11974,14 +11982,14 @@ static ctl_table ath_static_sysctls[] =
- .proc_handler = proc_dointvec
- },
- #endif
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "xchanmode",
- .mode = 0444,
- .data = &ath_xchanmode,
- .maxlen = sizeof(ath_xchanmode),
- .proc_handler = proc_dointvec
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "calibrate",
- .mode = 0644,
- .data = &ath_calinterval,
-@@ -11993,14 +12001,14 @@ static ctl_table ath_static_sysctls[] =
- { 0 }
- };
- static ctl_table ath_ath_table[] = {
-- { .ctl_name = DEV_ATH,
-+ { CTLNAME(DEV_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",
- .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
-
-+#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) \
---- a/ath_hal/ah_os.c
-+++ b/ath_hal/ah_os.c
-@@ -518,7 +518,7 @@ EXPORT_SYMBOL(ath_hal_memcmp);
-
- static ctl_table ath_hal_sysctls[] = {
- #ifdef AH_DEBUG
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "debug",
- .mode = 0644,
- .data = &ath_hal_debug,
-@@ -526,21 +526,21 @@ static ctl_table ath_hal_sysctls[] = {
- .proc_handler = proc_dointvec
- },
- #endif
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .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",
- .mode = 0644,
- .data = &ath_hal_additional_swba_backoff,
-@@ -548,19 +548,19 @@ static ctl_table ath_hal_sysctls[] = {
- .proc_handler = proc_dointvec
- },
- #ifdef AH_DEBUG_ALQ
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "alq",
- .mode = 0644,
- .proc_handler = sysctl_hw_ath_hal_log
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .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",
- .mode = 0644,
- .data = &ath_hal_alq_lost,
-@@ -571,21 +571,21 @@ static ctl_table ath_hal_sysctls[] = {
- { 0 }
- };
- static ctl_table ath_hal_table[] = {
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "hal",
- .mode = 0555,
- .child = ath_hal_sysctls
- }, { 0 }
- };
- static ctl_table ath_ath_table[] = {
-- { .ctl_name = DEV_ATH,
-+ { CTLNAME(DEV_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",
- .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
-
-+#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
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "debug",
- .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
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "monitor_nods_only",
- .mode = 0644,
- .proc_handler = ieee80211_sysctl_monitor_nods_only
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "monitor_txf_len",
- .mode = 0644,
- .proc_handler = ieee80211_sysctl_monitor_txf_len
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "monitor_phy_errors",
- .mode = 0644,
- .proc_handler = ieee80211_sysctl_monitor_phy_errors
- },
-- { .ctl_name = CTL_AUTO,
-+ { CTLNAME(CTL_AUTO)
- .procname = "monitor_crc_errors",
- .mode = 0644,
- .proc_handler = ieee80211_sysctl_monitor_crc_errors
- },
- /* NB: must be last entry before NULL */
-- { .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];
--- 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
}
}
/*
* 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;
}
--- a/net80211/ieee80211_scan_ap.c
+++ b/net80211/ieee80211_scan_ap.c
-@@ -595,6 +595,14 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -595,6 +595,14 @@ ap_end(struct ieee80211_scan_state *ss,
ic = vap->iv_ic;
/* record stats for the channel that was scanned last */
ic->ic_set_channel(ic);
spin_lock_irqsave(&channel_lock, sflags);
-@@ -648,6 +656,8 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -648,6 +656,8 @@ ap_end(struct ieee80211_scan_state *ss,
IEEE80211_SCHEDULE_TQUEUE(&as->as_actiontq);
res = 1;
}
- { 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 },
--- /dev/null
+--- 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
+@@ -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,
+- .procname = "dev_vendor",
++ { .procname = "dev_vendor",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_hwinfo,
+- .strategy = &sysctl_string,
+ .data = "N/A",
+ .maxlen = 1,
+ .extra2 = (void *)ATH_CARD_VENDOR,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "dev_name",
++ { .procname = "dev_name",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_hwinfo,
+- .strategy = &sysctl_string,
+ .data = "N/A",
+ .maxlen = 1,
+ .extra2 = (void *)ATH_CARD_NAME,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "slottime",
++ { .procname = "slottime",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_SLOTTIME,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "acktimeout",
++ { .procname = "acktimeout",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_ACKTIMEOUT,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "ctstimeout",
++ { .procname = "ctstimeout",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_CTSTIMEOUT,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "distance",
++ { .procname = "distance",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_DISTANCE,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "silent",
++ { .procname = "silent",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_SILENT,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "softled",
++ { .procname = "softled",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_SOFTLED,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "ledpin",
++ { .procname = "ledpin",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_LEDPIN,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "countrycode",
++ { .procname = "countrycode",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_COUNTRYCODE,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "outdoor",
++ { .procname = "outdoor",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_OUTDOOR,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "regdomain",
++ { .procname = "regdomain",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_REGDOMAIN,
+ },
+ #ifdef AR_DEBUG
+- { .ctl_name = CTL_AUTO,
+- .procname = "debug",
++ { .procname = "debug",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_DEBUG,
+ },
+ #endif
+- { .ctl_name = CTL_AUTO,
+- .procname = "poweroffset",
++ { .procname = "poweroffset",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_POWEROFFSET,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "txantenna",
++ { .procname = "txantenna",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_TXANTENNA,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "rxantenna",
++ { .procname = "rxantenna",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_RXANTENNA,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "diversity",
++ { .procname = "diversity",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_DIVERSITY,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "txintrperiod",
++ { .procname = "txintrperiod",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_TXINTRPERIOD,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "fftxqmin",
++ { .procname = "fftxqmin",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_FFTXQMIN,
+ },
+ #ifdef ATH_SUPERG_XR
+- { .ctl_name = CTL_AUTO,
+- .procname = "xrpollperiod",
++ { .procname = "xrpollperiod",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_XR_POLL_PERIOD,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "xrpollcount",
++ { .procname = "xrpollcount",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_XR_POLL_COUNT,
+ },
+ #endif
+- { .ctl_name = CTL_AUTO,
+- .procname = "ackrate",
++ { .procname = "ackrate",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_ACKRATE,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "channelbw",
++ { .procname = "channelbw",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_CHANBW,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "rp",
++ { .procname = "rp",
+ .mode = 0200,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_RP,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "radar_print",
++ { .procname = "radar_print",
+ .mode = 0200,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_RP_PRINT,
+ },
+- { .ctl_name = CTL_AUTO,
+- .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,
+- .procname = "radar_dump",
++ { .procname = "radar_dump",
+ .mode = 0200,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_RP_PRINT_MEM,
+ },
+- { .ctl_name = CTL_AUTO,
+- .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,
+- .procname = "rp_flush",
++ { .procname = "rp_flush",
+ .mode = 0200,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_RP_FLUSH,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "panic",
++ { .procname = "panic",
+ .mode = 0200,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_PANIC,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "rp_ignored",
++ { .procname = "rp_ignored",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_RP_IGNORED,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "radar_ignored",
++ { .procname = "radar_ignored",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_RADAR_IGNORED,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "intmit",
++ { .procname = "intmit",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_INTMIT,
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "noise_immunity",
++ { .procname = "noise_immunity",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .extra2 = (void *)ATH_NOISE_IMMUNITY,
+ },
+- { .ctl_name = CTL_AUTO,
+- .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,
+- .procname = "cca_thresh",
++ { .procname = "cca_thresh",
+ .mode = 0644,
+ .proc_handler = ath_sysctl_halparam,
+ .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);
+- 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 */
+- 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];
+@@ -12001,23 +11961,20 @@ ath_announce(struct net_device *dev)
+ */
+ static ctl_table ath_static_sysctls[] = {
+ #ifdef AR_DEBUG
+- { .ctl_name = CTL_AUTO,
+- .procname = "debug",
++ { .procname = "debug",
+ .mode = 0644,
+ .data = &ath_debug,
+ .maxlen = sizeof(ath_debug),
+ .proc_handler = proc_dointvec
+ },
+ #endif
+- { .ctl_name = CTL_AUTO,
+- .procname = "xchanmode",
++ { .procname = "xchanmode",
+ .mode = 0444,
+ .data = &ath_xchanmode,
+ .maxlen = sizeof(ath_xchanmode),
+ .proc_handler = proc_dointvec
+ },
+- { .ctl_name = CTL_AUTO,
+- .procname = "calibrate",
++ { .procname = "calibrate",
+ .mode = 0644,
+ .data = &ath_calinterval,
+ .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,
+- .procname = "ath",
++ { .procname = "ath",
+ .mode = 0555,
+ .child = ath_static_sysctls
+ }, { 0 }
+ };
+ static ctl_table ath_root_table[] = {
+- { .ctl_name = CTL_DEV,
+- .procname = "dev",
++ { .procname = "dev",
+ .mode = 0555,
+ .child = ath_ath_table
+ }, { 0 }
+--- a/net80211/ieee80211_linux.c
++++ b/net80211/ieee80211_linux.c
+@@ -699,40 +699,33 @@ IEEE80211_SYSCTL_DECL(ieee80211_sysctl_m
+
+ 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,50 +518,43 @@ EXPORT_SYMBOL(ath_hal_memcmp);
+
+ static ctl_table ath_hal_sysctls[] = {
+ #ifdef AH_DEBUG
+- { .ctl_name = CTL_AUTO,
+- .procname = "debug",
++ { .procname = "debug",
+ .mode = 0644,
+ .data = &ath_hal_debug,
+ .maxlen = sizeof(ath_hal_debug),
+ .proc_handler = proc_dointvec
+ },
+ #endif
+- { .ctl_name = CTL_AUTO,
+- .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,
+- .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,
+- .procname = "swba_backoff",
++ { .procname = "swba_backoff",
+ .mode = 0644,
+ .data = &ath_hal_additional_swba_backoff,
+ .maxlen = sizeof(ath_hal_additional_swba_backoff),
+ .proc_handler = proc_dointvec
+ },
+ #ifdef AH_DEBUG_ALQ
+- { .ctl_name = CTL_AUTO,
+- .procname = "alq",
++ { .procname = "alq",
+ .mode = 0644,
+ .proc_handler = sysctl_hw_ath_hal_log
+ },
+- { .ctl_name = CTL_AUTO,
+- .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,
+- .procname = "alq_lost",
++ { .procname = "alq_lost",
+ .mode = 0644,
+ .data = &ath_hal_alq_lost,
+ .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,
+- .procname = "hal",
++ { .procname = "hal",
+ .mode = 0555,
+ .child = ath_hal_sysctls
+ }, { 0 }
+ };
+ static ctl_table ath_ath_table[] = {
+- { .ctl_name = DEV_ATH,
+- .procname = "ath",
++ { .procname = "ath",
+ .mode = 0555,
+ .child = ath_hal_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/amrr/amrr.c
++++ b/ath_rate/amrr/amrr.c
+@@ -482,8 +482,7 @@ static int min_threshold = 1;
+ */
+
+ static ctl_table ath_rate_static_sysctls[] = {
+- { .ctl_name = CTL_AUTO,
+- .procname = "interval",
++ { .procname = "interval",
+ .mode = 0644,
+ .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,
+- .procname = "max_success_threshold",
++ { .procname = "max_success_threshold",
+ .mode = 0644,
+ .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,
+- .procname = "min_success_threshold",
++ { .procname = "min_success_threshold",
+ .mode = 0644,
+ .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,
+- .procname = "raise",
++ { .procname = "raise",
+ .mode = 0644,
+ .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,
+- .procname = "raise_threshold",
++ { .procname = "raise_threshold",
+ .mode = 0644,
+ .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,
+- .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 }