From: Felix Fietkau Date: Sun, 31 May 2009 02:25:32 +0000 (+0000) Subject: madwifi: add better hw detection, use a power offset for setting/getting tx power... X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=3b49a36a2302c59f334ccd699b94ed3bfff6e7ca madwifi: add better hw detection, use a power offset for setting/getting tx power for cards that have a twisted eeprom SVN-Revision: 16224 --- diff --git a/package/madwifi/patches/384-hwdetect.patch b/package/madwifi/patches/384-hwdetect.patch index 397b69c2e1..b327e786c3 100644 --- a/package/madwifi/patches/384-hwdetect.patch +++ b/package/madwifi/patches/384-hwdetect.patch @@ -33,7 +33,7 @@ /* Allocate space for dynamically determined maximum VAP count */ sc->sc_bslot = kmalloc(ath_maxvaps * sizeof(struct ieee80211vap*), GFP_KERNEL); -@@ -1508,6 +1520,28 @@ ath_vap_create(struct ieee80211com *ic, +@@ -1508,6 +1520,29 @@ ath_vap_create(struct ieee80211com *ic, return vap; } @@ -55,6 +55,7 @@ + continue; + + sc->sc_hwinfo = c; ++ sc->sc_poweroffset = c->poweroffset; + break; + } +} @@ -62,7 +63,23 @@ static void ath_vap_delete(struct ieee80211vap *vap) { -@@ -10821,6 +10855,12 @@ ath_ioctl(struct net_device *dev, struct +@@ -10225,6 +10260,7 @@ static u_int32_t + ath_set_clamped_maxtxpower(struct ath_softc *sc, + u_int32_t new_clamped_maxtxpower) + { ++ new_clamped_maxtxpower -= sc->sc_poweroffset; + (void)ath_hal_settxpowlimit(sc->sc_ah, new_clamped_maxtxpower); + return ath_get_clamped_maxtxpower(sc); + } +@@ -10238,6 +10274,7 @@ ath_get_clamped_maxtxpower(struct ath_so + { + u_int32_t clamped_maxtxpower; + (void)ath_hal_getmaxtxpow(sc->sc_ah, &clamped_maxtxpower); ++ clamped_maxtxpower += sc->sc_poweroffset; + return clamped_maxtxpower; + } + +@@ -10821,6 +10858,12 @@ ath_ioctl(struct net_device *dev, struct * is to add module parameters. */ @@ -75,7 +92,7 @@ /* * Dynamic (i.e. per-device) sysctls. These are automatically * mirrored in /proc/sys. -@@ -10900,6 +10940,38 @@ ath_sysctl_get_intmit(struct ath_softc * +@@ -10900,6 +10943,38 @@ ath_sysctl_get_intmit(struct ath_softc * } static int @@ -114,7 +131,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos) { struct ath_softc *sc = ctl->extra1; -@@ -11179,6 +11251,24 @@ static int maxint = 0x7fffffff; /* 32-b +@@ -11179,6 +11254,24 @@ static int maxint = 0x7fffffff; /* 32-b static const ctl_table ath_sysctl_template[] = { { .ctl_name = CTL_AUTO, @@ -174,7 +191,15 @@ unsigned int sc_invalid:1; /* being detached */ unsigned int sc_mrretry:1; /* multi-rate retry support */ -@@ -929,4 +935,15 @@ int ar_device(int devid); +@@ -683,6 +689,7 @@ struct ath_softc { + const HAL_RATE_TABLE *sc_quarter_rates; /* quarter rate table */ + HAL_OPMODE sc_opmode; /* current hal operating mode */ + enum ieee80211_phymode sc_curmode; /* current phy mode */ ++ u_int sc_poweroffset; /* hardware power offset */ + u_int16_t sc_curtxpow; /* current tx power limit */ + u_int16_t sc_curaid; /* current association id */ + HAL_CHANNEL sc_curchan; /* current h/w channel */ +@@ -929,4 +936,16 @@ int ar_device(int devid); void ath_radar_detected(struct ath_softc *sc, const char* message); @@ -185,6 +210,7 @@ + u32 id; + u32 subvendor; + u32 subid; ++ u32 poweroffset; +}; + +extern void ath_hw_detect(struct ath_softc *sc, const struct ath_hw_detect *cards, int n_cards, u32 vendor, u32 id, u32 subvendor, u32 subid); @@ -200,92 +226,27 @@ #include #include -@@ -181,12 +182,97 @@ exit_ath_wmac(u_int16_t wlanNum, struct +@@ -181,12 +182,32 @@ exit_ath_wmac(u_int16_t wlanNum, struct return 0; } +static const char ubnt[] = "Ubiquiti Networks"; ++/* { vendorname, cardname, vendorid, cardid, subsys vendorid, subsys id, poweroffset } */ +static const struct ath_hw_detect cards[] = { -+ { -+ .vendor_name = ubnt, -+ .card_name = "PowerStation2 (18V)", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xb102, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "PowerStation2 (16D)", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xb202, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "PowerStation2 (EXT)", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xb302, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "PowerStation5 (22V)", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xb105, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "PowerStation5 (EXT)", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xb305, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "WispStation5", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xa105, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "LiteStation2", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xa002, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "LiteStation5", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xa005, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "NanoStation2", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xc002, -+ }, -+ { -+ .vendor_name = ubnt, -+ .card_name = "NanoStation5", -+ .vendor = PCI_ANY_ID, -+ .id = PCI_ANY_ID, -+ .subvendor = PCI_ANY_ID, -+ .subid = 0xc005, -+ }, ++ { ubnt, "PowerStation2 (18V)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb102 }, ++ { ubnt, "PowerStation2 (16D)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb202 }, ++ { ubnt, "PowerStation2 (EXT)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb302 }, ++ { ubnt, "PowerStation5 (22V)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb105 }, ++ { ubnt, "PowerStation5 (EXT)", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xb305 }, ++ { ubnt, "WispStation5", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xa105 }, ++ { ubnt, "LiteStation2", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xa002 }, ++ { ubnt, "LiteStation5", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xa005 }, ++ { ubnt, "NanoStation2", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc002 }, ++ { ubnt, "NanoStation5", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc005 }, ++ { ubnt, "NanoStation Loco2", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc102 }, ++ { ubnt, "NanoStation Loco5", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc105 }, ++ { ubnt, "Bullet2", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc202 }, ++ { ubnt, "Bullet5", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc205 }, +}; + static int @@ -298,7 +259,7 @@ if (((wlanNum != 0) && (wlanNum != 1)) || (sclist[wlanNum] != NULL)) -@@ -248,6 +334,16 @@ init_ath_wmac(u_int16_t devid, u_int16_t +@@ -248,6 +269,16 @@ init_ath_wmac(u_int16_t devid, u_int16_t sc->aps_sc.sc_softled = 1; /* SoftLED over GPIO */ sc->aps_sc.sc_ledpin = config->board->sysLedGpio; sc->aps_sc.sc_invalid = 0; @@ -315,3 +276,50 @@ return 0; bad4: +--- a/ath/if_ath_pci.c ++++ b/ath/if_ath_pci.c +@@ -123,6 +123,33 @@ static u16 ath_devidmap[][2] = { + { 0xff1a, 0x001a } + }; + ++static const char ubnt[] = "Ubiquiti Networks"; ++/* { vendorname, cardname, vendorid, cardid, subsys vendorid, subsys id, poweroffset } */ ++static const struct ath_hw_detect cards[] = { ++ { ubnt, "XR2", 0x168c, 0x001b, 0x0777, 0x3002, 10 }, ++ { ubnt, "XR2", 0x168c, 0x001b, 0x7777, 0x3002, 10 }, ++ { ubnt, "XR2.3", 0x168c, 0x001b, 0x0777, 0x3b02, 10 }, ++ { ubnt, "XR2.6", 0x168c, 0x001b, 0x0777, 0x3c02, 10 }, ++ { ubnt, "XR3-2.8", 0x168c, 0x001b, 0x0777, 0x3b03, 10 }, ++ { ubnt, "XR3-3.6", 0x168c, 0x001b, 0x0777, 0x3c03, 10 }, ++ { ubnt, "XR3", 0x168c, 0x001b, 0x0777, 0x3003, 10 }, ++ { ubnt, "XR4", 0x168c, 0x001b, 0x0777, 0x3004, 10 }, ++ { ubnt, "XR5", 0x168c, 0x001b, 0x0777, 0x3005, 10 }, ++ { ubnt, "XR5", 0x168c, 0x001b, 0x7777, 0x3005, 10 }, ++ { ubnt, "XR7", 0x168c, 0x001b, 0x0777, 0x3007, 10 }, ++ { ubnt, "XR9", 0x168c, 0x001b, 0x0777, 0x3009, 10 }, ++ { ubnt, "SRC", 0x168c, 0x0013, 0x168c, 0x1042, 1 }, ++ { ubnt, "SR2", 0x168c, 0x0013, 0x0777, 0x2041, 10 }, ++ { ubnt, "SR4", 0x168c, 0x0013, 0x0777, 0x2004, 6 }, ++ { ubnt, "SR4", 0x168c, 0x0013, 0x7777, 0x2004, 6 }, ++ { ubnt, "SR4C", 0x168c, 0x0013, 0x0777, 0x1004, 6 }, ++ { ubnt, "SR4C", 0x168c, 0x0013, 0x7777, 0x1004, 6 }, ++ { ubnt, "SR5", 0x168c, 0x0013, 0x168c, 0x2042, 7 }, ++ { ubnt, "SR9", 0x168c, 0x0013, 0x7777, 0x2009, 12 }, ++ { ubnt, "SR71A", 0x168c, 0x0027, 0x168c, 0x2082, 10 }, ++ { ubnt, "SR71", 0x168c, 0x0027, 0x0777, 0x4082, 10 }, ++}; ++ + 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 + printk(KERN_INFO "%s: %s: %s: mem=0x%lx, irq=%d\n", + dev_info, dev->name, athname ? athname : "Atheros ???", phymem, dev->irq); + ++ ath_hw_detect(&sc->aps_sc, cards, ARRAY_SIZE(cards), ++ pdev->vendor, pdev->device, ++ pdev->subsystem_vendor, pdev->subsystem_device); ++ + /* ready to process interrupts */ + sc->aps_sc.sc_invalid = 0; + diff --git a/package/madwifi/patches/385-antenna_fix.patch b/package/madwifi/patches/385-antenna_fix.patch index 9e34304402..e3899643be 100644 --- a/package/madwifi/patches/385-antenna_fix.patch +++ b/package/madwifi/patches/385-antenna_fix.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -6668,6 +6668,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 */ diff --git a/package/madwifi/patches/389-autochannel.patch b/package/madwifi/patches/389-autochannel.patch index c818b89ef9..06c5c12a7d 100644 --- a/package/madwifi/patches/389-autochannel.patch +++ b/package/madwifi/patches/389-autochannel.patch @@ -8,7 +8,7 @@ /* calibrate every 30 secs in steady state but check every second at first. */ static int ath_calinterval = ATH_SHORT_CALINTERVAL; -@@ -2580,6 +2581,7 @@ ath_init(struct net_device *dev) +@@ -2581,6 +2582,7 @@ ath_init(struct net_device *dev) * be followed by initialization of the appropriate bits * and then setup of the interrupt mask. */ @@ -16,7 +16,7 @@ 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)) { -@@ -2913,6 +2915,48 @@ ath_hw_check_atim(struct ath_softc *sc, +@@ -2914,6 +2916,48 @@ ath_hw_check_atim(struct ath_softc *sc, return 0; } @@ -65,7 +65,7 @@ /* * Reset the hardware w/o losing operational state. This is -@@ -2940,6 +2984,7 @@ ath_reset(struct net_device *dev) +@@ -2941,6 +2985,7 @@ ath_reset(struct net_device *dev) * Convert to a HAL channel description with the flags * constrained to reflect the current operating mode. */ @@ -73,7 +73,7 @@ c = ic->ic_curchan; sc->sc_curchan.channel = c->ic_freq; sc->sc_curchan.channelFlags = ath_chan2flags(c); -@@ -9022,6 +9067,7 @@ ath_chan_set(struct ath_softc *sc, struc +@@ -9023,6 +9068,7 @@ ath_chan_set(struct ath_softc *sc, struc u_int8_t channel_change_required = 0; struct timeval tv; @@ -81,7 +81,7 @@ /* * Convert to a HAL channel description with * the flags constrained to reflect the current -@@ -9030,6 +9076,14 @@ ath_chan_set(struct ath_softc *sc, struc +@@ -9031,6 +9077,14 @@ ath_chan_set(struct ath_softc *sc, struc memset(&hchan, 0, sizeof(HAL_CHANNEL)); hchan.channel = chan->ic_freq; hchan.channelFlags = ath_chan2flags(chan); @@ -98,7 +98,7 @@ do_gettimeofday(&tv); --- a/ath/if_athvar.h +++ b/ath/if_athvar.h -@@ -773,6 +773,7 @@ struct ath_softc { +@@ -774,6 +774,7 @@ struct ath_softc { struct ieee80211vap **sc_bslot; /* beacon xmit slots */ int sc_bnext; /* next slot for beacon xmit */ diff --git a/package/madwifi/patches/393-mbss_vap_auth.patch b/package/madwifi/patches/393-mbss_vap_auth.patch index e1c9cae0d0..e4c50f9d82 100644 --- a/package/madwifi/patches/393-mbss_vap_auth.patch +++ b/package/madwifi/patches/393-mbss_vap_auth.patch @@ -319,7 +319,7 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -6588,9 +6588,8 @@ ath_recv_mgmt(struct ieee80211vap * vap, +@@ -6589,9 +6589,8 @@ ath_recv_mgmt(struct ieee80211vap * vap, sc->sc_recv_mgmt(vap, ni_or_null, skb, subtype, rssi, rtsf); @@ -330,7 +330,7 @@ (const struct ieee80211_frame_min *)skb->data); if (ni == NULL) { DPRINTF(sc, ATH_DEBUG_BEACON, "Dropping; node unknown.\n"); -@@ -6745,7 +6744,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; @@ -340,7 +340,7 @@ unsigned int len; int type; u_int phyerr; -@@ -6900,12 +6901,15 @@ rx_accept: +@@ -6901,12 +6902,15 @@ rx_accept: skb_trim(skb, skb->len - IEEE80211_CRC_LEN); if (mic_fail) { @@ -358,7 +358,7 @@ if (ni && ni->ni_table) { ieee80211_check_mic(ni, skb); -@@ -6967,11 +6971,24 @@ drop_micfail: +@@ -6968,11 +6972,24 @@ drop_micfail: * for its use. If the sender is unknown spam the * frame; it'll be dropped where it's not wanted. */ @@ -385,7 +385,7 @@ ATH_RSSI_LPF(ATH_NODE(ni)->an_avgrssi, rs->rs_rssi); type = ieee80211_input(ni->ni_vap, ni, skb, rs->rs_rssi, bf->bf_tsf); ieee80211_unref_node(&ni); -@@ -6980,24 +6997,35 @@ drop_micfail: +@@ -6981,24 +6998,35 @@ drop_micfail: * No key index or no entry, do a lookup and * add the node to the mapping table if possible. */ diff --git a/package/madwifi/patches/395-ath_ff_unmap.patch b/package/madwifi/patches/395-ath_ff_unmap.patch index 6ba99caf31..4f88d039e8 100644 --- a/package/madwifi/patches/395-ath_ff_unmap.patch +++ b/package/madwifi/patches/395-ath_ff_unmap.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -13527,7 +13527,7 @@ cleanup_ath_buf(struct ath_softc *sc, st +@@ -13530,7 +13530,7 @@ cleanup_ath_buf(struct ath_softc *sc, st bus_unmap_single( sc->sc_bdev, bf->bf_skbaddrff[i], diff --git a/package/madwifi/patches/396-napi_ff_fix.patch b/package/madwifi/patches/396-napi_ff_fix.patch index fbfd30e266..695a445f68 100644 --- a/package/madwifi/patches/396-napi_ff_fix.patch +++ b/package/madwifi/patches/396-napi_ff_fix.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -6733,10 +6733,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; @@ -13,7 +13,7 @@ #endif struct ath_buf *bf; struct ieee80211com *ic = &sc->sc_ic; -@@ -6779,13 +6779,15 @@ process_rx_again: +@@ -6780,13 +6780,15 @@ process_rx_again: break; } @@ -33,7 +33,7 @@ skb = bf->bf_skb; if (skb == NULL) { -@@ -7069,8 +7071,8 @@ rx_next: +@@ -7070,8 +7072,8 @@ rx_next: if (sc->sc_isr & HAL_INT_RX) { u_int64_t hw_tsf = ath_hal_gettsf64(ah); sc->sc_isr &= ~HAL_INT_RX; diff --git a/package/madwifi/patches/400-new_hal.patch b/package/madwifi/patches/400-new_hal.patch index 7de829ae7d..d994c3a2f0 100644 --- a/package/madwifi/patches/400-new_hal.patch +++ b/package/madwifi/patches/400-new_hal.patch @@ -15,7 +15,7 @@ /* * Check if the MAC has multi-rate retry support. * We do this by trying to setup a fake extended -@@ -7563,7 +7571,7 @@ ath_txq_setup(struct ath_softc *sc, int +@@ -7564,7 +7572,7 @@ ath_txq_setup(struct ath_softc *sc, int if (qtype == HAL_TX_QUEUE_UAPSD) qi.tqi_qflags = HAL_TXQ_TXDESCINT_ENABLE; else diff --git a/package/madwifi/patches/406-monitor_r3711.patch b/package/madwifi/patches/406-monitor_r3711.patch index 13d1d54904..4e2c6aefb7 100644 --- a/package/madwifi/patches/406-monitor_r3711.patch +++ b/package/madwifi/patches/406-monitor_r3711.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -6529,7 +6529,7 @@ ath_capture(struct net_device *dev, cons +@@ -6530,7 +6530,7 @@ ath_capture(struct net_device *dev, cons /* Never copy the SKB, as it is ours on the RX side, and this is the * last process on the TX side and we only modify our own headers. */ @@ -9,7 +9,7 @@ if (tskb == NULL) { DPRINTF(sc, ATH_DEBUG_ANY, "Dropping; ath_skb_removepad failed!\n"); -@@ -6537,6 +6537,8 @@ ath_capture(struct net_device *dev, cons +@@ -6538,6 +6538,8 @@ ath_capture(struct net_device *dev, cons } ieee80211_input_monitor(ic, tskb, bf, tx, tsf, sc); diff --git a/package/madwifi/patches/408-changeset_r3337.patch b/package/madwifi/patches/408-changeset_r3337.patch index 78f89d273a..c78daf4c69 100644 --- a/package/madwifi/patches/408-changeset_r3337.patch +++ b/package/madwifi/patches/408-changeset_r3337.patch @@ -10,7 +10,7 @@ Please let us know if you think your name should be mentioned here! --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -3146,7 +3146,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 *) diff --git a/package/madwifi/patches/410-ar231x_2.6.28.patch b/package/madwifi/patches/410-ar231x_2.6.28.patch index 87177c3986..30d1c56a4c 100644 --- a/package/madwifi/patches/410-ar231x_2.6.28.patch +++ b/package/madwifi/patches/410-ar231x_2.6.28.patch @@ -81,10 +81,10 @@ -} - static const char ubnt[] = "Ubiquiti Networks"; + /* { vendorname, cardname, vendorid, cardid, subsys vendorid, subsys id, poweroffset } */ static const struct ath_hw_detect cards[] = { - { -@@ -266,6 +238,114 @@ static const struct ath_hw_detect cards[ - }, +@@ -201,6 +173,114 @@ static const struct ath_hw_detect cards[ + { ubnt, "Bullet5", PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0xc205 }, }; +static void @@ -198,7 +198,7 @@ static int init_ath_wmac(u_int16_t devid, u_int16_t wlanNum, struct ar531x_config *config) { -@@ -318,7 +398,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t +@@ -253,7 +333,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t sc->aps_sc.sc_iobase = (void __iomem *) dev->mem_start; sc->aps_sc.sc_bdev = NULL; @@ -207,7 +207,7 @@ printk(KERN_WARNING "%s: %s: request_irq failed\n", dev_info, dev->name); goto bad3; } -@@ -328,21 +408,12 @@ init_ath_wmac(u_int16_t devid, u_int16_t +@@ -263,21 +343,12 @@ init_ath_wmac(u_int16_t devid, u_int16_t athname = ath_hal_probe(ATHEROS_VENDOR_ID, devid); printk(KERN_INFO "%s: %s: %s: mem=0x%lx, irq=%d\n", dev_info, dev->name, athname ? athname : "Atheros ???", dev->mem_start, dev->irq); @@ -230,7 +230,7 @@ return 0; -@@ -357,6 +428,29 @@ init_ath_wmac(u_int16_t devid, u_int16_t +@@ -292,6 +363,29 @@ init_ath_wmac(u_int16_t devid, u_int16_t return -ENODEV; } @@ -260,7 +260,7 @@ static int ahb_wmac_probe(struct platform_device *pdev) { u_int16_t devid; -@@ -377,11 +471,18 @@ static int ahb_wmac_remove(struct platfo +@@ -312,11 +406,18 @@ static int ahb_wmac_remove(struct platfo return 0; } diff --git a/package/madwifi/patches/412-fragmentation_fix.patch b/package/madwifi/patches/412-fragmentation_fix.patch index dbe9f8e4f6..92c411b2bf 100644 --- a/package/madwifi/patches/412-fragmentation_fix.patch +++ b/package/madwifi/patches/412-fragmentation_fix.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -3683,6 +3683,7 @@ ff_bypass: +@@ -3684,6 +3684,7 @@ ff_bypass: * already alloc'd */ ATH_TXBUF_LOCK_IRQ(sc); diff --git a/package/madwifi/patches/413-rxorn.patch b/package/madwifi/patches/413-rxorn.patch index b4174716d7..0e8d885da6 100644 --- a/package/madwifi/patches/413-rxorn.patch +++ b/package/madwifi/patches/413-rxorn.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -2307,6 +2307,17 @@ ath_intr(int irq, void *dev_id, struct p +@@ -2308,6 +2308,17 @@ ath_intr(int irq, void *dev_id, struct p sc->sc_isr = status; status &= sc->sc_imask; /* discard unasked for bits */ @@ -18,7 +18,7 @@ /* As soon as we know we have a real interrupt we intend to service, * we will check to see if we need an initial hardware TSF reading. * Normally we would just populate this all the time to keep things -@@ -2319,10 +2330,6 @@ ath_intr(int irq, void *dev_id, struct p +@@ -2320,10 +2331,6 @@ ath_intr(int irq, void *dev_id, struct p sc->sc_stats.ast_hardware++; ath_hal_intrset(ah, 0); /* disable intr's until reset */ ATH_SCHEDULE_TQUEUE(&sc->sc_fataltq, &needmark); diff --git a/package/madwifi/patches/414-txpower.patch b/package/madwifi/patches/414-txpower.patch index 68e7942d48..662afe7d93 100644 --- a/package/madwifi/patches/414-txpower.patch +++ b/package/madwifi/patches/414-txpower.patch @@ -165,7 +165,7 @@ static void ath_poll_disable(struct net_device *dev); static void ath_poll_enable(struct net_device *dev); -@@ -3167,7 +3166,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); @@ -174,7 +174,7 @@ hdrlen = ieee80211_anyhdrsize(wh); pktlen = skb->len + IEEE80211_CRC_LEN; -@@ -8389,7 +8388,7 @@ ath_tx_start(struct net_device *dev, str +@@ -8390,7 +8389,7 @@ ath_tx_start(struct net_device *dev, str pktlen, /* packet length */ hdrlen, /* header length */ atype, /* Atheros packet type */ @@ -183,7 +183,7 @@ txrate, try0, /* series 0 rate/tries */ keyix, /* key cache index */ antenna, /* antenna mode */ -@@ -10380,59 +10379,16 @@ ath_get_clamped_maxtxpower(struct ath_so +@@ -10383,59 +10382,16 @@ ath_get_clamped_maxtxpower(struct ath_so /* XXX: this function needs some locking to avoid being called * twice/interrupted */ diff --git a/package/madwifi/patches/416-wprobe.patch b/package/madwifi/patches/416-wprobe.patch index 0eb5f8928d..aa0c638c24 100644 --- a/package/madwifi/patches/416-wprobe.patch +++ b/package/madwifi/patches/416-wprobe.patch @@ -411,7 +411,7 @@ return vap; } -@@ -1605,6 +1607,7 @@ ath_vap_delete(struct ieee80211vap *vap) +@@ -1606,6 +1608,7 @@ ath_vap_delete(struct ieee80211vap *vap) decrease = 0; ieee80211_vap_detach(vap); @@ -419,7 +419,7 @@ /* NB: memory is reclaimed through dev->destructor callback */ if (decrease) sc->sc_nvaps--; -@@ -5939,6 +5942,7 @@ ath_node_cleanup(struct ieee80211_node * +@@ -5940,6 +5943,7 @@ ath_node_cleanup(struct ieee80211_node * /* Clean up node-specific rate things - this currently appears to * always be a no-op */ sc->sc_rc->ops->node_cleanup(sc, ATH_NODE(ni)); @@ -427,7 +427,7 @@ ATH_NODE_UAPSD_LOCK_IRQ(an); #ifdef IEEE80211_DEBUG_REFCNT -@@ -7009,6 +7013,8 @@ drop_micfail: +@@ -7010,6 +7014,8 @@ drop_micfail: goto lookup_slowpath; } ATH_RSSI_LPF(ATH_NODE(ni)->an_avgrssi, rs->rs_rssi); @@ -436,7 +436,7 @@ type = ieee80211_input(ni->ni_vap, ni, skb, rs->rs_rssi, bf->bf_tsf); ieee80211_unref_node(&ni); } else { -@@ -7019,15 +7025,22 @@ drop_micfail: +@@ -7020,15 +7026,22 @@ drop_micfail: lookup_slowpath: vap = ieee80211_find_rxvap(ic, wh->i_addr1); @@ -461,7 +461,7 @@ type = ieee80211_input(vap, ni, skb, rs->rs_rssi, bf->bf_tsf); /* * If the station has a key cache slot assigned -@@ -8607,6 +8620,7 @@ ath_tx_processq(struct ath_softc *sc, st +@@ -8608,6 +8621,7 @@ ath_tx_processq(struct ath_softc *sc, st sc->sc_stats.ast_tx_rssi = ts->ts_rssi; ATH_RSSI_LPF(an->an_halstats.ns_avgtxrssi, ts->ts_rssi); @@ -469,7 +469,7 @@ if (bf->bf_skb->priority == WME_AC_VO || bf->bf_skb->priority == WME_AC_VI) ni->ni_ic->ic_wme.wme_hipri_traffic++; -@@ -10106,6 +10120,7 @@ ath_newassoc(struct ieee80211_node *ni, +@@ -10107,6 +10121,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); diff --git a/package/madwifi/patches/417-beacon_txpower.patch b/package/madwifi/patches/417-beacon_txpower.patch index 80d810a7db..5a336f8e52 100644 --- a/package/madwifi/patches/417-beacon_txpower.patch +++ b/package/madwifi/patches/417-beacon_txpower.patch @@ -9,7 +9,7 @@ static int countrycode = -1; static int maxvaps = -1; static int outdoor = -1; -@@ -4931,6 +4931,7 @@ ath_beacon_setup(struct ath_softc *sc, s +@@ -4932,6 +4932,7 @@ ath_beacon_setup(struct ath_softc *sc, s (((_ic)->ic_flags & (IEEE80211_F_SHPREAMBLE | IEEE80211_F_USEBARKER))\ == IEEE80211_F_SHPREAMBLE) struct ieee80211com *ic = bf->bf_node->ni_ic; @@ -17,7 +17,7 @@ struct sk_buff *skb = bf->bf_skb; struct ath_hal *ah = sc->sc_ah; struct ath_desc *ds; -@@ -4998,7 +4999,7 @@ ath_beacon_setup(struct ath_softc *sc, s +@@ -4999,7 +5000,7 @@ ath_beacon_setup(struct ath_softc *sc, s skb->len + IEEE80211_CRC_LEN, /* frame length */ sizeof(struct ieee80211_frame), /* header length */ HAL_PKT_TYPE_BEACON, /* Atheros packet type */ diff --git a/package/madwifi/patches/419-skb_unmap_crash.patch b/package/madwifi/patches/419-skb_unmap_crash.patch index 90c67edf58..54fd544d74 100644 --- a/package/madwifi/patches/419-skb_unmap_crash.patch +++ b/package/madwifi/patches/419-skb_unmap_crash.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -13493,7 +13493,7 @@ cleanup_ath_buf(struct ath_softc *sc, st +@@ -13496,7 +13496,7 @@ cleanup_ath_buf(struct ath_softc *sc, st if (bf == NULL) return bf; @@ -9,7 +9,7 @@ bus_unmap_single( sc->sc_bdev, bf->bf_skbaddr, -@@ -13501,8 +13501,6 @@ cleanup_ath_buf(struct ath_softc *sc, st +@@ -13504,8 +13504,6 @@ cleanup_ath_buf(struct ath_softc *sc, st sc->sc_rxbufsize : bf->bf_skb->len), direction); bf->bf_skbaddr = 0; diff --git a/package/madwifi/patches/420-diversity_fix.patch b/package/madwifi/patches/420-diversity_fix.patch index bfb4f7620c..8ec805c15c 100644 --- a/package/madwifi/patches/420-diversity_fix.patch +++ b/package/madwifi/patches/420-diversity_fix.patch @@ -8,7 +8,7 @@ sc->sc_rc = ieee80211_rate_attach(sc, ratectl); if (sc->sc_rc == NULL) { error = EIO; -@@ -2623,9 +2622,6 @@ ath_init(struct net_device *dev) +@@ -2624,9 +2623,6 @@ ath_init(struct net_device *dev) ath_radar_update(sc); ath_rp_flush(sc); @@ -18,7 +18,7 @@ /* * Setup the hardware after reset: the key cache * is filled as needed and the receive engine is -@@ -3018,7 +3014,6 @@ ath_reset(struct net_device *dev) +@@ -3019,7 +3015,6 @@ ath_reset(struct net_device *dev) ath_setintmit(sc); ath_update_txpow(sc); /* update tx power state */ ath_radar_update(sc); @@ -26,7 +26,7 @@ if (ath_startrecv(sc) != 0) /* restart recv */ EPRINTF(sc, "Unable to start receive logic.\n"); if (sc->sc_softled) -@@ -5352,27 +5347,6 @@ ath_beacon_send(struct ath_softc *sc, in +@@ -5353,27 +5348,6 @@ ath_beacon_send(struct ath_softc *sc, in } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot)) ath_setslottime(sc); /* commit change to hardware */ @@ -54,7 +54,7 @@ if (bfaddr != 0) { /* * Stop any current DMA and put the new frame(s) on the queue. -@@ -6733,9 +6707,8 @@ ath_setdefantenna(struct ath_softc *sc, +@@ -6734,9 +6708,8 @@ ath_setdefantenna(struct ath_softc *sc, { struct ath_hal *ah = sc->sc_ah; @@ -65,7 +65,7 @@ if (sc->sc_defant != antenna) sc->sc_stats.ast_ant_defswitch++; sc->sc_defant = antenna; -@@ -11154,7 +11127,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11157,7 +11130,7 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl break; } sc->sc_diversity = val; diff --git a/package/madwifi/patches/421-channel_handling.patch b/package/madwifi/patches/421-channel_handling.patch index 6531a9ec19..8ccecdfdd2 100644 --- a/package/madwifi/patches/421-channel_handling.patch +++ b/package/madwifi/patches/421-channel_handling.patch @@ -184,7 +184,7 @@ #ifdef ATH_SUPERG_XR ic->ic_ath_cap |= (ath_hal_xrsupported(ah) ? IEEE80211_ATHC_XR : 0); #endif -@@ -4469,17 +4485,17 @@ ath_mode_init(struct net_device *dev) +@@ -4470,17 +4486,17 @@ ath_mode_init(struct net_device *dev) * Set the slot time based on the current setting. */ static void @@ -210,7 +210,7 @@ sc->sc_updateslot = OK; } -@@ -4501,7 +4517,7 @@ ath_updateslot(struct net_device *dev) +@@ -4502,7 +4518,7 @@ ath_updateslot(struct net_device *dev) if (ic->ic_opmode == IEEE80211_M_HOSTAP) sc->sc_updateslot = UPDATE; else if (dev->flags & IFF_RUNNING) @@ -219,7 +219,7 @@ } #ifdef ATH_SUPERG_DYNTURBO -@@ -5345,7 +5361,7 @@ ath_beacon_send(struct ath_softc *sc, in +@@ -5346,7 +5362,7 @@ ath_beacon_send(struct ath_softc *sc, in sc->sc_updateslot = COMMIT; /* commit next beacon */ sc->sc_slotupdate = slot; } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot)) @@ -228,7 +228,7 @@ if (bfaddr != 0) { /* -@@ -7798,12 +7814,14 @@ ath_get_ivlen(struct ieee80211_key *k) +@@ -7799,12 +7815,14 @@ ath_get_ivlen(struct ieee80211_key *k) * Get transmit rate index using rate in Kbps */ static __inline int @@ -245,7 +245,7 @@ ndx = i; break; } -@@ -8096,7 +8114,7 @@ ath_tx_start(struct net_device *dev, str +@@ -8097,7 +8115,7 @@ ath_tx_start(struct net_device *dev, str atype = HAL_PKT_TYPE_NORMAL; /* default */ if (ismcast) { @@ -254,7 +254,7 @@ txrate = rt->info[rix].rateCode; if (shortPreamble) txrate |= rt->info[rix].shortPreamble; -@@ -9063,7 +9081,7 @@ ath_chan_change(struct ath_softc *sc, st +@@ -9064,7 +9082,7 @@ ath_chan_change(struct ath_softc *sc, st struct net_device *dev = sc->sc_dev; enum ieee80211_phymode mode; @@ -263,7 +263,7 @@ ath_rate_setup(dev, mode); ath_setcurmode(sc, mode); -@@ -10120,8 +10138,7 @@ ath_newassoc(struct ieee80211_node *ni, +@@ -10121,8 +10139,7 @@ ath_newassoc(struct ieee80211_node *ni, } static int @@ -273,7 +273,7 @@ { struct ath_softc *sc = dev->priv; struct ieee80211com *ic = &sc->sc_ic; -@@ -10135,17 +10152,31 @@ ath_getchannels(struct net_device *dev, +@@ -10136,17 +10153,31 @@ ath_getchannels(struct net_device *dev, EPRINTF(sc, "Insufficient memory for channel table!\n"); return -ENOMEM; } @@ -307,7 +307,7 @@ /* * Convert HAL channels to ieee80211 ones. */ -@@ -10389,7 +10420,7 @@ ath_xr_rate_setup(struct net_device *dev +@@ -10392,7 +10423,7 @@ ath_xr_rate_setup(struct net_device *dev struct ieee80211com *ic = &sc->sc_ic; const HAL_RATE_TABLE *rt; struct ieee80211_rateset *rs; @@ -316,7 +316,7 @@ sc->sc_xr_rates = ath_hal_getratetable(ah, HAL_MODE_XR); rt = sc->sc_xr_rates; if (rt == NULL) -@@ -10402,57 +10433,16 @@ ath_xr_rate_setup(struct net_device *dev +@@ -10405,57 +10436,16 @@ ath_xr_rate_setup(struct net_device *dev } else maxrates = rt->rateCount; rs = &ic->ic_sup_xr_rates; @@ -380,7 +380,7 @@ static int ath_rate_setup(struct net_device *dev, u_int mode) { -@@ -10461,7 +10451,7 @@ ath_rate_setup(struct net_device *dev, u +@@ -10464,7 +10454,7 @@ ath_rate_setup(struct net_device *dev, u struct ieee80211com *ic = &sc->sc_ic; const HAL_RATE_TABLE *rt; struct ieee80211_rateset *rs; @@ -389,7 +389,7 @@ switch (mode) { case IEEE80211_MODE_11A: -@@ -10479,6 +10469,12 @@ ath_rate_setup(struct net_device *dev, u +@@ -10482,6 +10472,12 @@ ath_rate_setup(struct net_device *dev, u case IEEE80211_MODE_TURBO_G: sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108G); break; @@ -402,7 +402,7 @@ default: DPRINTF(sc, ATH_DEBUG_ANY, "Invalid mode %u\n", mode); return 0; -@@ -10493,10 +10489,16 @@ ath_rate_setup(struct net_device *dev, u +@@ -10496,10 +10492,16 @@ ath_rate_setup(struct net_device *dev, u maxrates = IEEE80211_RATE_MAXSIZE; } else maxrates = rt->rateCount; @@ -419,7 +419,7 @@ return 1; } -@@ -10525,13 +10527,18 @@ ath_setcurmode(struct ath_softc *sc, enu +@@ -10528,13 +10530,18 @@ ath_setcurmode(struct ath_softc *sc, enu { 0, 500, 130 }, }; const HAL_RATE_TABLE *rt; @@ -440,7 +440,7 @@ memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap)); for (i = 0; i < 32; i++) { u_int8_t ix = rt->rateCodeToIndex[i]; -@@ -10541,7 +10548,7 @@ ath_setcurmode(struct ath_softc *sc, enu +@@ -10544,7 +10551,7 @@ ath_setcurmode(struct ath_softc *sc, enu continue; } sc->sc_hwmap[i].ieeerate = @@ -449,7 +449,7 @@ if (rt->info[ix].shortPreamble || rt->info[ix].phy == IEEE80211_T_OFDM) sc->sc_hwmap[i].flags |= IEEE80211_RADIOTAP_F_SHORTPRE; -@@ -10942,9 +10949,106 @@ enum { +@@ -10945,9 +10952,106 @@ enum { ATH_MAXVAPS = 26, ATH_INTMIT = 27, ATH_NOISE_IMMUNITY = 28, @@ -557,7 +557,7 @@ static int ath_sysctl_set_intmit(struct ath_softc *sc, long ctl, u_int val) { -@@ -11023,6 +11127,7 @@ static int +@@ -11026,6 +11130,7 @@ static int ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos) { struct ath_softc *sc = ctl->extra1; @@ -565,7 +565,7 @@ struct ath_hal *ah = sc->sc_ah; u_int val; u_int tab_3_val[3]; -@@ -11046,25 +11151,34 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11049,25 +11154,34 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl lenp, ppos); if (ret == 0) { switch ((long)ctl->extra2) { @@ -613,7 +613,7 @@ break; case ATH_SOFTLED: if (val != sc->sc_softled) { -@@ -11217,6 +11331,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11220,6 +11334,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl } } else { switch ((long)ctl->extra2) { @@ -623,7 +623,7 @@ case ATH_SLOTTIME: val = ath_hal_getslottime(ah); break; -@@ -11235,6 +11352,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11238,6 +11355,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl case ATH_COUNTRYCODE: ath_hal_getcountrycode(ah, &val); break; @@ -633,7 +633,7 @@ case ATH_MAXVAPS: val = ath_maxvaps; break; -@@ -11348,11 +11468,17 @@ static const ctl_table ath_sysctl_templa +@@ -11351,11 +11471,17 @@ static const ctl_table ath_sysctl_templa }, { .ctl_name = CTL_AUTO, .procname = "countrycode", @@ -652,7 +652,7 @@ .procname = "maxvaps", .mode = 0444, .proc_handler = ath_sysctl_halparam, -@@ -11360,7 +11486,7 @@ static const ctl_table ath_sysctl_templa +@@ -11363,7 +11489,7 @@ static const ctl_table ath_sysctl_templa }, { .ctl_name = CTL_AUTO, .procname = "regdomain", @@ -661,7 +661,7 @@ .proc_handler = ath_sysctl_halparam, .extra2 = (void *)ATH_REGDOMAIN, }, -@@ -11423,6 +11549,12 @@ static const ctl_table ath_sysctl_templa +@@ -11426,6 +11552,12 @@ static const ctl_table ath_sysctl_templa .extra2 = (void *)ATH_ACKRATE, }, { .ctl_name = CTL_AUTO, @@ -674,7 +674,7 @@ .procname = "rp", .mode = 0200, .proc_handler = ath_sysctl_halparam, -@@ -11663,13 +11795,6 @@ static ctl_table ath_static_sysctls[] = +@@ -11666,13 +11798,6 @@ static ctl_table ath_static_sysctls[] = }, #endif { .ctl_name = CTL_AUTO, @@ -688,7 +688,7 @@ .procname = "maxvaps", .mode = 0444, .data = &ath_maxvaps, -@@ -11677,13 +11802,6 @@ static ctl_table ath_static_sysctls[] = +@@ -11680,13 +11805,6 @@ static ctl_table ath_static_sysctls[] = .proc_handler = proc_dointvec }, { .ctl_name = CTL_AUTO, @@ -704,7 +704,7 @@ .data = &ath_xchanmode, --- a/ath/if_athvar.h +++ b/ath/if_athvar.h -@@ -688,16 +688,17 @@ struct ath_softc { +@@ -688,17 +688,18 @@ struct ath_softc { int8_t sc_ofdm_weak_det; /* OFDM weak frames detection, -1 == auto */ /* rate tables */ @@ -718,6 +718,7 @@ - const HAL_RATE_TABLE *sc_quarter_rates; /* quarter rate table */ HAL_OPMODE sc_opmode; /* current hal operating mode */ enum ieee80211_phymode sc_curmode; /* current phy mode */ + u_int sc_poweroffset; /* hardware power offset */ u_int16_t sc_curtxpow; /* current tx power limit */ u_int16_t sc_curaid; /* current association id */ HAL_CHANNEL sc_curchan; /* current h/w channel */ @@ -725,7 +726,7 @@ u_int8_t sc_curbssid[IEEE80211_ADDR_LEN]; u_int8_t sc_rixmap[256]; /* IEEE to h/w rate table ix */ struct { -@@ -808,6 +809,8 @@ struct ath_softc { +@@ -809,6 +810,8 @@ struct ath_softc { u_int32_t sc_dturbo_bw_turbo; /* bandwidth threshold */ #endif u_int sc_slottimeconf; /* manual override for slottime */ @@ -734,7 +735,7 @@ struct timer_list sc_dfs_excl_timer; /* mark expiration timer task */ struct timer_list sc_dfs_cac_timer; /* dfs wait timer */ -@@ -826,6 +829,7 @@ struct ath_softc { +@@ -827,6 +830,7 @@ struct ath_softc { int sc_rp_num; int sc_rp_min; HAL_BOOL (*sc_rp_analyse)(struct ath_softc *sc); @@ -742,7 +743,7 @@ struct ATH_TQ_STRUCT sc_rp_tq; int sc_rp_ignored; /* if set, we ignored all -@@ -941,6 +945,48 @@ int ar_device(int devid); +@@ -942,6 +946,48 @@ int ar_device(int devid); DEV_NAME(_v->iv_ic->ic_dev)) void ath_radar_detected(struct ath_softc *sc, const char* message); diff --git a/package/madwifi/patches/423-phyerr_handling.patch b/package/madwifi/patches/423-phyerr_handling.patch index b5059af625..7f3cbafe23 100644 --- a/package/madwifi/patches/423-phyerr_handling.patch +++ b/package/madwifi/patches/423-phyerr_handling.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -4390,13 +4390,12 @@ ath_key_update_end(struct ieee80211vap * +@@ -4391,13 +4391,12 @@ ath_key_update_end(struct ieee80211vap * static u_int32_t ath_calcrxfilter(struct ath_softc *sc) { @@ -15,7 +15,7 @@ HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; if (ic->ic_opmode != IEEE80211_M_STA) -@@ -4415,9 +4414,8 @@ ath_calcrxfilter(struct ath_softc *sc) +@@ -4416,9 +4415,8 @@ ath_calcrxfilter(struct ath_softc *sc) if (sc->sc_hasintmit && !sc->sc_needmib && ath_hal_getintmit(ah, NULL)) rfilt |= HAL_RX_FILTER_PHYERR; if (sc->sc_curchan.privFlags & CHANNEL_DFS) diff --git a/package/madwifi/patches/424-timing.patch b/package/madwifi/patches/424-timing.patch index b4c00bd64b..93b699694f 100644 --- a/package/madwifi/patches/424-timing.patch +++ b/package/madwifi/patches/424-timing.patch @@ -16,7 +16,7 @@ return 0; bad3: -@@ -2672,6 +2674,7 @@ ath_init(struct net_device *dev) +@@ -2673,6 +2675,7 @@ ath_init(struct net_device *dev) */ ath_chan_change(sc, ic->ic_curchan); ath_set_ack_bitrate(sc, sc->sc_ackrate); @@ -24,7 +24,7 @@ dev->flags |= IFF_RUNNING; /* we are ready to go */ ieee80211_start_running(ic); /* start all VAPs */ #ifdef ATH_TX99_DIAG -@@ -4483,17 +4486,52 @@ ath_mode_init(struct net_device *dev) +@@ -4484,17 +4487,52 @@ ath_mode_init(struct net_device *dev) * Set the slot time based on the current setting. */ static void @@ -82,7 +82,7 @@ sc->sc_updateslot = OK; } -@@ -4515,7 +4553,7 @@ ath_updateslot(struct net_device *dev) +@@ -4516,7 +4554,7 @@ ath_updateslot(struct net_device *dev) if (ic->ic_opmode == IEEE80211_M_HOSTAP) sc->sc_updateslot = UPDATE; else if (dev->flags & IFF_RUNNING) @@ -91,7 +91,7 @@ } #ifdef ATH_SUPERG_DYNTURBO -@@ -5359,7 +5397,7 @@ ath_beacon_send(struct ath_softc *sc, in +@@ -5360,7 +5398,7 @@ ath_beacon_send(struct ath_softc *sc, in sc->sc_updateslot = COMMIT; /* commit next beacon */ sc->sc_slotupdate = slot; } else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot)) @@ -100,7 +100,7 @@ if (bfaddr != 0) { /* -@@ -9429,7 +9467,8 @@ ath_set_coverageclass(struct ieee80211co +@@ -9430,7 +9468,8 @@ ath_set_coverageclass(struct ieee80211co { struct ath_softc *sc = ic->ic_dev->priv; @@ -110,7 +110,7 @@ return; } -@@ -10950,6 +10989,7 @@ enum { +@@ -10953,6 +10992,7 @@ enum { ATH_OFDM_WEAK_DET = 29, ATH_CHANBW = 30, ATH_OUTDOOR = 31, @@ -118,7 +118,7 @@ }; /* -@@ -11162,21 +11202,31 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11165,21 +11205,31 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl sc->sc_slottimeconf = val; else sc->sc_slottimeconf = 0; @@ -153,7 +153,7 @@ break; case ATH_SOFTLED: if (val != sc->sc_softled) { -@@ -11332,6 +11382,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl +@@ -11335,6 +11385,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl case ATH_CHANBW: val = sc->sc_chanbw ?: 20; break; @@ -163,7 +163,7 @@ case ATH_SLOTTIME: val = ath_hal_getslottime(ah); break; -@@ -11453,6 +11506,12 @@ static const ctl_table ath_sysctl_templa +@@ -11456,6 +11509,12 @@ static const ctl_table ath_sysctl_templa .extra2 = (void *)ATH_CTSTIMEOUT, }, { .ctl_name = CTL_AUTO, @@ -232,7 +232,7 @@ struct ath_softc { struct ieee80211com sc_ic; /* NB: must be first */ struct net_device *sc_dev; -@@ -838,6 +847,8 @@ struct ath_softc { +@@ -839,6 +848,8 @@ struct ath_softc { * detected radars */ u_int32_t sc_nexttbtt; u_int64_t sc_last_tsf; @@ -241,7 +241,7 @@ }; typedef void (*ath_callback) (struct ath_softc *); -@@ -945,49 +956,76 @@ int ar_device(int devid); +@@ -946,49 +957,76 @@ int ar_device(int devid); DEV_NAME(_v->iv_ic->ic_dev)) void ath_radar_detected(struct ath_softc *sc, const char* message); diff --git a/package/madwifi/patches/425-rc_rexmit.patch b/package/madwifi/patches/425-rc_rexmit.patch index 407e4b3c16..3098169e7d 100644 --- a/package/madwifi/patches/425-rc_rexmit.patch +++ b/package/madwifi/patches/425-rc_rexmit.patch @@ -20,7 +20,7 @@ struct ath_ratectrl { --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -8634,6 +8634,8 @@ ath_tx_processq(struct ath_softc *sc, st +@@ -8635,6 +8635,8 @@ ath_tx_processq(struct ath_softc *sc, st ni = bf->bf_node; if (ni != NULL) { @@ -29,7 +29,7 @@ an = ATH_NODE(ni); if (ts->ts_status == 0) { u_int8_t txant = ts->ts_antenna; -@@ -8686,15 +8688,43 @@ ath_tx_processq(struct ath_softc *sc, st +@@ -8687,15 +8689,43 @@ ath_tx_processq(struct ath_softc *sc, st lr = ts->ts_longretry; sc->sc_stats.ast_tx_shortretry += sr; sc->sc_stats.ast_tx_longretry += lr; diff --git a/package/madwifi/patches/430-use_netdev_priv.patch b/package/madwifi/patches/430-use_netdev_priv.patch index 7c420ebd50..37a9b28146 100644 --- a/package/madwifi/patches/430-use_netdev_priv.patch +++ b/package/madwifi/patches/430-use_netdev_priv.patch @@ -20,7 +20,7 @@ if ((!rt) || (rate < 0) || (rate >= ARRAY_SIZE(sc->sc_hwmap))) --- a/ath/if_ath_ahb.c +++ b/ath/if_ath_ahb.c -@@ -268,7 +268,7 @@ static int ahb_wmac_probe(struct platfor +@@ -203,7 +203,7 @@ static int ahb_wmac_probe(struct platfor if (!dev) return -ENOMEM; @@ -29,7 +29,7 @@ sc->aps_sc.sc_dev = dev; dev->irq = platform_get_irq(pdev, 0); -@@ -365,7 +365,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t +@@ -300,7 +300,7 @@ init_ath_wmac(u_int16_t devid, u_int16_t printk(KERN_ERR "%s: no memory for device state\n", dev_info); goto bad2; } @@ -76,7 +76,7 @@ ieee80211_vap_setup(ic, dev, name, opmode, flags, master); /* override with driver methods */ vap = &avp->av_vap; -@@ -1570,7 +1570,7 @@ static void +@@ -1571,7 +1571,7 @@ static void ath_vap_delete(struct ieee80211vap *vap) { struct net_device *dev = vap->iv_ic->ic_dev; @@ -85,7 +85,7 @@ struct ath_hal *ah = sc->sc_ah; struct ath_vap *avp = ATH_VAP(vap); int decrease = 1; -@@ -1672,7 +1672,7 @@ void +@@ -1673,7 +1673,7 @@ void ath_suspend(struct net_device *dev) { #ifdef AR_DEBUG @@ -94,7 +94,7 @@ #endif DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags); -@@ -1683,7 +1683,7 @@ void +@@ -1684,7 +1684,7 @@ void ath_resume(struct net_device *dev) { #ifdef AR_DEBUG @@ -103,7 +103,7 @@ #endif DPRINTF(sc, ATH_DEBUG_ANY, "flags=%x\n", dev->flags); -@@ -2247,7 +2247,7 @@ ath_intr(int irq, void *dev_id, struct p +@@ -2248,7 +2248,7 @@ ath_intr(int irq, void *dev_id, struct p #endif { struct net_device *dev = dev_id; @@ -112,7 +112,7 @@ struct ath_hal *ah = sc->sc_ah; u_int64_t hw_tsf = 0; HAL_INT status; -@@ -2468,7 +2468,7 @@ static void +@@ -2469,7 +2469,7 @@ static void ath_fatal_tasklet(TQUEUE_ARG data) { struct net_device *dev = (struct net_device *)data; @@ -121,7 +121,7 @@ EPRINTF(sc, "Hardware error; resetting.\n"); ath_reset(dev); -@@ -2478,7 +2478,7 @@ static void +@@ -2479,7 +2479,7 @@ static void ath_rxorn_tasklet(TQUEUE_ARG data) { struct net_device *dev = (struct net_device *)data; @@ -130,7 +130,7 @@ EPRINTF(sc, "Receive FIFO overrun; resetting.\n"); ath_reset(dev); -@@ -2488,7 +2488,7 @@ static void +@@ -2489,7 +2489,7 @@ static void ath_bmiss_tasklet(TQUEUE_ARG data) { struct net_device *dev = (struct net_device *)data; @@ -139,7 +139,7 @@ if (time_before(jiffies, sc->sc_ic.ic_bmiss_guard)) { /* Beacon miss interrupt occured too short after last beacon -@@ -2567,7 +2567,7 @@ done: +@@ -2568,7 +2568,7 @@ done: static int ath_init(struct net_device *dev) { @@ -148,7 +148,7 @@ struct ieee80211com *ic = &sc->sc_ic; struct ath_hal *ah = sc->sc_ah; HAL_STATUS status; -@@ -2692,7 +2692,7 @@ done: +@@ -2693,7 +2693,7 @@ done: static int ath_stop_locked(struct net_device *dev) { @@ -157,7 +157,7 @@ struct ieee80211com *ic = &sc->sc_ic; struct ath_hal *ah = sc->sc_ah; -@@ -2777,7 +2777,7 @@ static void ath_set_beacon_cal(struct at +@@ -2778,7 +2778,7 @@ static void ath_set_beacon_cal(struct at static int ath_stop(struct net_device *dev) { @@ -166,7 +166,7 @@ int error; ATH_LOCK(sc); -@@ -2997,7 +2997,7 @@ ath_fetch_idle_time(struct ath_softc *sc +@@ -2998,7 +2998,7 @@ ath_fetch_idle_time(struct ath_softc *sc static int ath_reset(struct net_device *dev) { @@ -175,7 +175,7 @@ struct ieee80211com *ic = &sc->sc_ic; struct ath_hal *ah = sc->sc_ah; struct ieee80211_channel *c; -@@ -3163,7 +3163,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) { @@ -184,7 +184,7 @@ struct ath_hal *ah = sc->sc_ah; struct ieee80211_phy_params *ph = (struct ieee80211_phy_params *) (SKB_CB(skb) + 1); /* NB: SKB_CB casts to CB struct*. */ -@@ -3476,7 +3476,7 @@ _take_txbuf(struct ath_softc *sc, int fo +@@ -3477,7 +3477,7 @@ _take_txbuf(struct ath_softc *sc, int fo static int ath_hardstart(struct sk_buff *skb, struct net_device *dev) { @@ -193,7 +193,7 @@ struct ieee80211_node *ni = NULL; struct ath_buf *bf = NULL; ath_bufhead bf_head; -@@ -3791,7 +3791,7 @@ static int +@@ -3792,7 +3792,7 @@ static int ath_mgtstart(struct ieee80211com *ic, struct sk_buff *skb) { struct net_device *dev = ic->ic_dev; @@ -202,7 +202,7 @@ struct ath_buf *bf = NULL; int error; -@@ -4150,7 +4150,7 @@ static ieee80211_keyix_t +@@ -4151,7 +4151,7 @@ static ieee80211_keyix_t ath_key_alloc(struct ieee80211vap *vap, const struct ieee80211_key *k) { struct net_device *dev = vap->iv_ic->ic_dev; @@ -211,7 +211,7 @@ /* * Group key allocation must be handled specially for -@@ -4215,7 +4215,7 @@ ath_key_delete(struct ieee80211vap *vap, +@@ -4216,7 +4216,7 @@ ath_key_delete(struct ieee80211vap *vap, struct ieee80211_node *ninfo) { struct net_device *dev = vap->iv_ic->ic_dev; @@ -220,7 +220,7 @@ struct ath_hal *ah = sc->sc_ah; struct ieee80211_node *ni = NULL; const struct ieee80211_cipher *cip = k->wk_cipher; -@@ -4291,14 +4291,14 @@ ath_key_set(struct ieee80211vap *vap, co +@@ -4292,14 +4292,14 @@ ath_key_set(struct ieee80211vap *vap, co const u_int8_t mac[IEEE80211_ADDR_LEN]) { struct net_device *dev = vap->iv_ic->ic_dev; @@ -237,7 +237,7 @@ /* * XXX Using in_softirq is not right since we might -@@ -4316,7 +4316,7 @@ static void ath_poll_disable(struct net_ +@@ -4317,7 +4317,7 @@ static void ath_poll_disable(struct net_ static void ath_poll_enable(struct net_device *dev) { @@ -246,7 +246,7 @@ /* NB: see above */ if (!in_softirq()) { -@@ -4342,7 +4342,7 @@ ath_key_update_begin(struct ieee80211vap +@@ -4343,7 +4343,7 @@ ath_key_update_begin(struct ieee80211vap { struct net_device *dev = vap->iv_ic->ic_dev; #ifdef AR_DEBUG @@ -255,7 +255,7 @@ #endif DPRINTF(sc, ATH_DEBUG_KEYCACHE, "Begin\n"); -@@ -4360,7 +4360,7 @@ ath_key_update_end(struct ieee80211vap * +@@ -4361,7 +4361,7 @@ ath_key_update_end(struct ieee80211vap * { struct net_device *dev = vap->iv_ic->ic_dev; #ifdef AR_DEBUG @@ -264,7 +264,7 @@ #endif DPRINTF(sc, ATH_DEBUG_KEYCACHE, "End\n"); -@@ -4453,7 +4453,7 @@ ath_merge_mcast(struct ath_softc *sc, u_ +@@ -4454,7 +4454,7 @@ ath_merge_mcast(struct ath_softc *sc, u_ static void ath_mode_init(struct net_device *dev) { @@ -273,7 +273,7 @@ struct ath_hal *ah = sc->sc_ah; u_int32_t rfilt, mfilt[2]; -@@ -4539,7 +4539,7 @@ ath_set_timing(struct ath_softc *sc) +@@ -4540,7 +4540,7 @@ ath_set_timing(struct ath_softc *sc) static void ath_updateslot(struct net_device *dev) { @@ -282,7 +282,7 @@ struct ieee80211com *ic = &sc->sc_ic; /* -@@ -4569,7 +4569,7 @@ ath_beacon_dturbo_config(struct ieee8021 +@@ -4570,7 +4570,7 @@ ath_beacon_dturbo_config(struct ieee8021 (vap->iv_bss && (vap->iv_bss->ni_ath_flags & (IEEE80211_ATHC_TURBOP)) == \ (IEEE80211_ATHC_TURBOP)) struct ieee80211com *ic = vap->iv_ic; @@ -291,7 +291,7 @@ if (ic->ic_opmode == IEEE80211_M_HOSTAP && IS_CAPABLE(vap)) { -@@ -4617,7 +4617,7 @@ static void +@@ -4618,7 +4618,7 @@ static void ath_beacon_dturbo_update(struct ieee80211vap *vap, int *needmark, u_int8_t dtim) { struct ieee80211com *ic = vap->iv_ic; @@ -300,7 +300,7 @@ u_int32_t bss_traffic; if (sc->sc_ignore_ar) { -@@ -4758,7 +4758,7 @@ static void +@@ -4759,7 +4759,7 @@ static void ath_turbo_switch_mode(unsigned long data) { struct net_device *dev = (struct net_device *)data; @@ -309,7 +309,7 @@ struct ieee80211com *ic = &sc->sc_ic; unsigned int newflags; -@@ -5437,7 +5437,7 @@ static void +@@ -5438,7 +5438,7 @@ static void ath_bstuck_tasklet(TQUEUE_ARG data) { struct net_device *dev = (struct net_device *)data; @@ -318,7 +318,7 @@ /* * XXX:if the bmisscount is cleared while the * tasklet execution is pending, the following -@@ -5890,7 +5890,7 @@ ath_node_alloc_debug(struct ieee80211vap +@@ -5891,7 +5891,7 @@ ath_node_alloc_debug(struct ieee80211vap ath_node_alloc(struct ieee80211vap *vap) #endif { @@ -327,7 +327,7 @@ const size_t space = sizeof(struct ath_node) + sc->sc_rc->arc_space; struct ath_node *an = kmalloc(space, GFP_ATOMIC); if (an != NULL) { -@@ -5926,7 +5926,7 @@ ath_node_cleanup(struct ieee80211_node * +@@ -5927,7 +5927,7 @@ ath_node_cleanup(struct ieee80211_node * #endif { struct ieee80211com *ic = ni->ni_ic; @@ -336,7 +336,7 @@ struct ath_node *an = ATH_NODE(ni); struct ath_buf *bf; -@@ -5984,7 +5984,7 @@ ath_node_free_debug(struct ieee80211_nod +@@ -5985,7 +5985,7 @@ ath_node_free_debug(struct ieee80211_nod ath_node_free(struct ieee80211_node *ni) #endif { @@ -345,7 +345,7 @@ #ifdef IEEE80211_DEBUG_REFCNT sc->sc_node_free_debug(ni, func, line); -@@ -6032,7 +6032,7 @@ ath_node_move_data(const struct ieee8021 +@@ -6033,7 +6033,7 @@ ath_node_move_data(const struct ieee8021 #ifdef NOT_YET struct ath_txq *txq = NULL; struct ieee80211com *ic = ni->ni_ic; @@ -354,7 +354,7 @@ struct ath_buf *bf, *prev, *bf_tmp, *bf_tmp1; struct ath_hal *ah = sc->sc_ah; struct sk_buff *skb = NULL; -@@ -6552,7 +6552,7 @@ static void +@@ -6553,7 +6553,7 @@ static void ath_capture(struct net_device *dev, const struct ath_buf *bf, struct sk_buff *skb, u_int64_t tsf, unsigned int tx) { @@ -363,7 +363,7 @@ struct ieee80211com *ic = &sc->sc_ic; struct sk_buff *tskb = NULL; -@@ -6612,7 +6612,7 @@ static void +@@ -6613,7 +6613,7 @@ static void ath_recv_mgmt(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null, struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf) { @@ -372,7 +372,7 @@ #ifdef AR_DEBUG struct ieee80211_frame *wh = (struct ieee80211_frame *)skb->data; #endif -@@ -6779,7 +6779,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 @@ -381,7 +381,7 @@ int rx_limit = min(dev->quota, *budget); #endif struct ath_buf *bf; -@@ -7301,7 +7301,7 @@ static void ath_grppoll_start(struct iee +@@ -7302,7 +7302,7 @@ static void ath_grppoll_start(struct iee struct sk_buff *skb = NULL; struct ath_buf *bf, *head = NULL; struct ieee80211com *ic = vap->iv_ic; @@ -390,7 +390,7 @@ struct ath_hal *ah = sc->sc_ah; u_int8_t rate; unsigned int ctsrate = 0, ctsduration = 0; -@@ -7519,7 +7519,7 @@ static void ath_grppoll_start(struct iee +@@ -7520,7 +7520,7 @@ static void ath_grppoll_start(struct iee static void ath_grppoll_stop(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -399,7 +399,7 @@ struct ath_hal *ah = sc->sc_ah; struct ath_txq *txq = &sc->sc_grpplq; struct ath_buf *bf; -@@ -7731,7 +7731,7 @@ ath_txq_update(struct ath_softc *sc, str +@@ -7732,7 +7732,7 @@ ath_txq_update(struct ath_softc *sc, str static int ath_wme_update(struct ieee80211com *ic) { @@ -408,7 +408,7 @@ if (sc->sc_uapsdq) ath_txq_update(sc, sc->sc_uapsdq, WME_AC_VO); -@@ -7750,7 +7750,7 @@ ath_uapsd_flush(struct ieee80211_node *n +@@ -7751,7 +7751,7 @@ ath_uapsd_flush(struct ieee80211_node *n { struct ath_node *an = ATH_NODE(ni); struct ath_buf *bf; @@ -417,7 +417,7 @@ struct ath_txq *txq; ATH_NODE_UAPSD_LOCK_IRQ(an); -@@ -7941,7 +7941,7 @@ ath_tx_start(struct net_device *dev, str +@@ -7942,7 +7942,7 @@ ath_tx_start(struct net_device *dev, str struct ath_buf *bf, struct sk_buff *skb, int nextfraglen) { #define MIN(a,b) ((a) < (b) ? (a) : (b)) @@ -426,7 +426,7 @@ struct ieee80211com *ic = ni->ni_ic; struct ieee80211vap *vap = ni->ni_vap; struct ath_hal *ah = sc->sc_ah; -@@ -8850,7 +8850,7 @@ static void +@@ -8851,7 +8851,7 @@ static void ath_tx_tasklet_q0(TQUEUE_ARG data) { struct net_device *dev = (struct net_device *)data; @@ -435,7 +435,7 @@ unsigned long flags; process_tx_again: -@@ -8881,7 +8881,7 @@ static void +@@ -8882,7 +8882,7 @@ static void ath_tx_tasklet_q0123(TQUEUE_ARG data) { struct net_device *dev = (struct net_device *)data; @@ -444,7 +444,7 @@ unsigned long flags; process_tx_again: -@@ -8926,7 +8926,7 @@ static void +@@ -8927,7 +8927,7 @@ static void ath_tx_tasklet(TQUEUE_ARG data) { struct net_device *dev = (struct net_device *)data; @@ -453,7 +453,7 @@ unsigned int i; unsigned long flags; -@@ -8954,7 +8954,7 @@ process_tx_again: +@@ -8955,7 +8955,7 @@ process_tx_again: static void ath_tx_timeout(struct net_device *dev) { @@ -462,7 +462,7 @@ if (ath_chan_unavail(sc)) return; -@@ -9362,7 +9362,7 @@ static void +@@ -9363,7 +9363,7 @@ static void ath_calibrate(unsigned long arg) { struct net_device *dev = (struct net_device *)arg; @@ -471,7 +471,7 @@ struct ath_hal *ah = sc->sc_ah; struct ieee80211com *ic = &sc->sc_ic; /* u_int32_t nchans; */ -@@ -9437,7 +9437,7 @@ static void +@@ -9438,7 +9438,7 @@ static void ath_scan_start(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -480,7 +480,7 @@ struct ath_hal *ah = sc->sc_ah; u_int32_t rfilt; -@@ -9457,7 +9457,7 @@ static void +@@ -9458,7 +9458,7 @@ static void ath_scan_end(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -489,7 +489,7 @@ struct ath_hal *ah = sc->sc_ah; u_int32_t rfilt; -@@ -9475,7 +9475,7 @@ static void +@@ -9476,7 +9476,7 @@ static void ath_set_channel(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -498,7 +498,7 @@ (void) ath_chan_set(sc, ic->ic_curchan); ic->ic_channoise = ath_hal_get_channel_noise(sc->sc_ah, &(sc->sc_curchan)); -@@ -9492,7 +9492,7 @@ ath_set_channel(struct ieee80211com *ic) +@@ -9493,7 +9493,7 @@ ath_set_channel(struct ieee80211com *ic) static void ath_set_coverageclass(struct ieee80211com *ic) { @@ -507,7 +507,7 @@ sc->sc_coverage = ic->ic_coverageclass * 3; ath_set_timing(sc); -@@ -9503,7 +9503,7 @@ ath_set_coverageclass(struct ieee80211co +@@ -9504,7 +9504,7 @@ ath_set_coverageclass(struct ieee80211co static u_int ath_mhz2ieee(struct ieee80211com *ic, u_int freq, u_int flags) { @@ -516,7 +516,7 @@ return (ath_hal_mhz2ieee(sc->sc_ah, freq, flags)); } -@@ -9518,7 +9518,7 @@ ath_newstate(struct ieee80211vap *vap, e +@@ -9519,7 +9519,7 @@ ath_newstate(struct ieee80211vap *vap, e struct ath_vap *avp = ATH_VAP(vap); struct ieee80211com *ic = vap->iv_ic; struct net_device *dev = ic->ic_dev; @@ -525,7 +525,7 @@ struct ath_hal *ah = sc->sc_ah; struct ieee80211_node *ni, *wds_ni; unsigned int i; -@@ -9958,7 +9958,7 @@ ath_setup_comp(struct ieee80211_node *ni +@@ -9959,7 +9959,7 @@ ath_setup_comp(struct ieee80211_node *ni { #define IEEE80211_KEY_XR (IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV) struct ieee80211vap *vap = ni->ni_vap; @@ -534,7 +534,7 @@ struct ath_node *an = ATH_NODE(ni); ieee80211_keyix_t keyix; -@@ -10012,7 +10012,7 @@ static void +@@ -10013,7 +10013,7 @@ static void ath_setup_stationkey(struct ieee80211_node *ni) { struct ieee80211vap *vap = ni->ni_vap; @@ -543,7 +543,7 @@ ieee80211_keyix_t keyix; keyix = ath_key_alloc(vap, &ni->ni_ucastkey); -@@ -10173,7 +10173,7 @@ ath_newassoc(struct ieee80211_node *ni, +@@ -10174,7 +10174,7 @@ ath_newassoc(struct ieee80211_node *ni, { struct ieee80211com *ic = ni->ni_ic; struct ieee80211vap *vap = ni->ni_vap; @@ -552,7 +552,7 @@ sc->sc_rc->ops->newassoc(sc, ATH_NODE(ni), isnew); ath_wprobe_node_join(ni->ni_vap, ni); -@@ -10204,7 +10204,7 @@ ath_newassoc(struct ieee80211_node *ni, +@@ -10205,7 +10205,7 @@ ath_newassoc(struct ieee80211_node *ni, static int ath_getchannels(struct net_device *dev) { @@ -561,7 +561,7 @@ struct ieee80211com *ic = &sc->sc_ic; struct ath_hal *ah = sc->sc_ah; HAL_CHANNEL *chans; -@@ -10479,7 +10479,7 @@ ath_update_txpow(struct ath_softc *sc) +@@ -10482,7 +10482,7 @@ ath_update_txpow(struct ath_softc *sc) static int ath_xr_rate_setup(struct net_device *dev) { @@ -570,7 +570,7 @@ struct ath_hal *ah = sc->sc_ah; struct ieee80211com *ic = &sc->sc_ic; const HAL_RATE_TABLE *rt; -@@ -10510,7 +10510,7 @@ ath_xr_rate_setup(struct net_device *dev +@@ -10513,7 +10513,7 @@ ath_xr_rate_setup(struct net_device *dev static int ath_rate_setup(struct net_device *dev, u_int mode) { @@ -579,7 +579,7 @@ struct ath_hal *ah = sc->sc_ah; struct ieee80211com *ic = &sc->sc_ic; const HAL_RATE_TABLE *rt; -@@ -10757,7 +10757,7 @@ ath_printtxbuf(const struct ath_buf *bf, +@@ -10760,7 +10760,7 @@ ath_printtxbuf(const struct ath_buf *bf, { const struct ath_tx_status *ts = &bf->bf_dsstatus.ds_txstat; const struct ath_desc *ds = bf->bf_desc; @@ -588,7 +588,7 @@ u_int8_t status = done ? ts->ts_status : 0; DPRINTF(sc, ATH_DEBUG_ANY, -@@ -10784,7 +10784,7 @@ ath_printtxbuf(const struct ath_buf *bf, +@@ -10787,7 +10787,7 @@ ath_printtxbuf(const struct ath_buf *bf, static struct net_device_stats * ath_getstats(struct net_device *dev) { @@ -597,7 +597,7 @@ struct net_device_stats *stats = &sc->sc_devstats; /* update according to private statistics */ -@@ -10807,7 +10807,7 @@ ath_getstats(struct net_device *dev) +@@ -10810,7 +10810,7 @@ ath_getstats(struct net_device *dev) static int ath_set_mac_address(struct net_device *dev, void *addr) { @@ -606,7 +606,7 @@ struct ieee80211com *ic = &sc->sc_ic; struct ath_hal *ah = sc->sc_ah; struct sockaddr *mac = addr; -@@ -10836,7 +10836,7 @@ ath_set_mac_address(struct net_device *d +@@ -10839,7 +10839,7 @@ ath_set_mac_address(struct net_device *d static int ath_change_mtu(struct net_device *dev, int mtu) { @@ -615,7 +615,7 @@ int error = 0; if (!(ATH_MIN_MTU < mtu && mtu <= ATH_MAX_MTU)) { -@@ -10923,7 +10923,7 @@ bad: +@@ -10926,7 +10926,7 @@ bad: static int ath_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { @@ -624,7 +624,7 @@ struct ieee80211com *ic = &sc->sc_ic; int error; -@@ -11804,7 +11804,7 @@ static void +@@ -11807,7 +11807,7 @@ static void ath_announce(struct net_device *dev) { #define HAL_MODE_DUALBAND (HAL_MODE_11A|HAL_MODE_11B) @@ -633,7 +633,7 @@ struct ath_hal *ah = sc->sc_ah; u_int modes, cc; static const int MLEN = 1024; -@@ -11991,7 +11991,7 @@ static void +@@ -11994,7 +11994,7 @@ static void txcont_configure_radio(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -642,7 +642,7 @@ struct ath_hal *ah = sc->sc_ah; struct ieee80211_wme_state *wme = &ic->ic_wme; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); -@@ -12265,7 +12265,7 @@ static void +@@ -12268,7 +12268,7 @@ static void txcont_queue_packet(struct ieee80211com *ic, struct ath_txq* txq) { struct net_device *dev = ic->ic_dev; @@ -651,7 +651,7 @@ struct ath_hal *ah = sc->sc_ah; struct ath_buf *bf = NULL; struct sk_buff *skb = NULL; -@@ -12398,7 +12398,7 @@ static void +@@ -12401,7 +12401,7 @@ static void txcont_on(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -660,7 +660,7 @@ if (IFF_RUNNING != (ic->ic_dev->flags & IFF_RUNNING)) { EPRINTF(sc, "Cannot enable txcont when" -@@ -12419,7 +12419,7 @@ static void +@@ -12422,7 +12422,7 @@ static void txcont_off(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -669,7 +669,7 @@ if (TAILQ_FIRST(&ic->ic_vaps)->iv_opmode != IEEE80211_M_WDS) sc->sc_beacons = 1; -@@ -12433,7 +12433,7 @@ static int +@@ -12436,7 +12436,7 @@ static int ath_get_dfs_testmode(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -678,7 +678,7 @@ return sc->sc_dfs_testmode; } -@@ -12460,7 +12460,7 @@ static void +@@ -12463,7 +12463,7 @@ static void ath_set_dfs_testmode(struct ieee80211com *ic, int value) { struct net_device *dev = ic->ic_dev; @@ -687,7 +687,7 @@ sc->sc_dfs_testmode = !!value; } -@@ -12470,7 +12470,7 @@ static int +@@ -12473,7 +12473,7 @@ static int ath_get_txcont(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -696,7 +696,7 @@ return sc->sc_txcont; } -@@ -12488,7 +12488,7 @@ static void +@@ -12491,7 +12491,7 @@ static void ath_set_txcont_power(struct ieee80211com *ic, unsigned int txpower) { struct net_device *dev = ic->ic_dev; @@ -705,7 +705,7 @@ int new_txcont_power = txpower > IEEE80211_TXPOWER_MAX ? IEEE80211_TXPOWER_MAX : txpower; if (sc->sc_txcont_power != new_txcont_power) { -@@ -12506,7 +12506,7 @@ static int +@@ -12509,7 +12509,7 @@ static int ath_get_txcont_power(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -714,7 +714,7 @@ /* VERY conservative default */ return sc->sc_txcont_power ? sc->sc_txcont_power : 0; } -@@ -12516,7 +12516,7 @@ ath_get_txcont_power(struct ieee80211com +@@ -12519,7 +12519,7 @@ ath_get_txcont_power(struct ieee80211com ath_set_txcont_rate(struct ieee80211com *ic, unsigned int new_rate) { struct net_device *dev = ic->ic_dev; @@ -723,7 +723,7 @@ if (sc->sc_txcont_rate != new_rate) { /* NOTE: This value is sanity checked and dropped down to * closest rate in txcont_on. */ -@@ -12533,7 +12533,7 @@ ath_set_txcont_rate(struct ieee80211com +@@ -12536,7 +12536,7 @@ ath_set_txcont_rate(struct ieee80211com ath_get_txcont_rate(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -732,7 +732,7 @@ return sc->sc_txcont_rate ? sc->sc_txcont_rate : 0; } -@@ -12543,7 +12543,7 @@ static void +@@ -12546,7 +12546,7 @@ static void ath_set_dfs_cac_time(struct ieee80211com *ic, unsigned int time_s) { struct net_device *dev = ic->ic_dev; @@ -741,7 +741,7 @@ sc->sc_dfs_cac_period = time_s; } -@@ -12553,7 +12553,7 @@ static unsigned int +@@ -12556,7 +12556,7 @@ static unsigned int ath_get_dfs_cac_time(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -750,7 +750,7 @@ return sc->sc_dfs_cac_period; } -@@ -12573,7 +12573,7 @@ static void +@@ -12576,7 +12576,7 @@ static void ath_set_dfs_excl_period(struct ieee80211com *ic, unsigned int time_s) { struct net_device *dev = ic->ic_dev; @@ -759,7 +759,7 @@ sc->sc_dfs_excl_period = time_s; } -@@ -12582,7 +12582,7 @@ static unsigned int +@@ -12585,7 +12585,7 @@ static unsigned int ath_get_dfs_excl_period(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -768,7 +768,7 @@ return sc->sc_dfs_excl_period; } -@@ -12594,7 +12594,7 @@ static unsigned int +@@ -12597,7 +12597,7 @@ static unsigned int ath_test_radar(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -777,7 +777,7 @@ if ((ic->ic_flags & IEEE80211_F_DOTH) && (sc->sc_curchan.privFlags & CHANNEL_DFS)) ath_radar_detected(sc, "ath_test_radar from user space"); else -@@ -12610,7 +12610,7 @@ static unsigned int +@@ -12613,7 +12613,7 @@ static unsigned int ath_dump_hal_map(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -786,7 +786,7 @@ ath_hal_dump_map(sc->sc_ah); return 0; } -@@ -12718,7 +12718,7 @@ ath_rcv_dev_event(struct notifier_block +@@ -12721,7 +12721,7 @@ ath_rcv_dev_event(struct notifier_block void *ptr) { struct net_device *dev = (struct net_device *)ptr; @@ -795,7 +795,7 @@ if (!dev || !sc || dev->open != &ath_init) return 0; -@@ -13453,7 +13453,7 @@ static unsigned int +@@ -13456,7 +13456,7 @@ static unsigned int ath_read_register(struct ieee80211com *ic, unsigned int address, unsigned int* value) { @@ -804,7 +804,7 @@ if (address >= MAX_REGISTER_ADDRESS) { IPRINTF(sc, "Illegal Atheros register access " "attempted: 0x%04x >= 0x%04x\n", -@@ -13483,7 +13483,7 @@ static unsigned int +@@ -13486,7 +13486,7 @@ static unsigned int ath_write_register(struct ieee80211com *ic, unsigned int address, unsigned int value) { @@ -813,7 +813,7 @@ if (address >= MAX_REGISTER_ADDRESS) { IPRINTF(sc, "Illegal Atheros register access " "attempted: 0x%04x >= 0x%04x\n", -@@ -13511,7 +13511,7 @@ static void +@@ -13514,7 +13514,7 @@ static void ath_registers_dump(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -822,7 +822,7 @@ ath_ar5212_registers_dump(sc); } #endif /* #ifdef ATH_REVERSE_ENGINEERING */ -@@ -13523,7 +13523,7 @@ static void +@@ -13526,7 +13526,7 @@ static void ath_registers_mark(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -831,7 +831,7 @@ ath_ar5212_registers_mark(sc); } #endif /* #ifdef ATH_REVERSE_ENGINEERING */ -@@ -13535,7 +13535,7 @@ static void +@@ -13538,7 +13538,7 @@ static void ath_registers_dump_delta(struct ieee80211com *ic) { struct net_device *dev = ic->ic_dev; @@ -842,7 +842,7 @@ #endif /* #ifdef ATH_REVERSE_ENGINEERING */ --- a/ath/if_ath_pci.c +++ b/ath/if_ath_pci.c -@@ -199,7 +199,7 @@ ath_pci_probe(struct pci_dev *pdev, cons +@@ -226,7 +226,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; -@@ -278,7 +278,7 @@ static void +@@ -309,7 +309,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) -@@ -296,7 +296,7 @@ ath_pci_suspend(struct pci_dev *pdev, pm +@@ -327,7 +327,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); } -@@ -313,7 +313,7 @@ ath_pci_resume(struct pci_dev *pdev) +@@ -344,7 +344,7 @@ ath_pci_resume(struct pci_dev *pdev) return err; /* XXX - Should this return nonzero on fail? */ diff --git a/package/madwifi/patches/431-compile_fixes.patch b/package/madwifi/patches/431-compile_fixes.patch index 16485cb8e5..c4d89b021a 100644 --- a/package/madwifi/patches/431-compile_fixes.patch +++ b/package/madwifi/patches/431-compile_fixes.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -2387,7 +2387,9 @@ ath_intr(int irq, void *dev_id, struct p +@@ -2388,7 +2388,9 @@ ath_intr(int irq, void *dev_id, struct p if (status & (HAL_INT_RX | HAL_INT_RXPHY)) { ath_uapsd_processtriggers(sc, hw_tsf); sc->sc_isr &= ~HAL_INT_RX; @@ -11,7 +11,7 @@ if (netif_rx_schedule_prep(dev, &sc->sc_napi)) #else if (netif_rx_schedule_prep(dev)) -@@ -2395,7 +2397,9 @@ ath_intr(int irq, void *dev_id, struct p +@@ -2396,7 +2398,9 @@ ath_intr(int irq, void *dev_id, struct p { sc->sc_imask &= ~HAL_INT_RX; ath_hal_intrset(ah, sc->sc_imask); @@ -22,7 +22,7 @@ __netif_rx_schedule(dev, &sc->sc_napi); #else __netif_rx_schedule(dev); -@@ -7131,7 +7135,9 @@ rx_next: +@@ -7132,7 +7136,9 @@ rx_next: local_irq_restore(flags); } diff --git a/package/madwifi/patches/432-backport_oops.patch b/package/madwifi/patches/432-backport_oops.patch index 5bcfa08093..4118fd812a 100644 --- a/package/madwifi/patches/432-backport_oops.patch +++ b/package/madwifi/patches/432-backport_oops.patch @@ -45,7 +45,7 @@ http://madwifi-project.org/changeset/4005 dev->tx_queue_len = ATH_TXBUF - ATH_TXBUF_MGT_RESERVED; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) netif_napi_add(dev, &sc->sc_napi, ath_rx_poll, 64); -@@ -12726,8 +12744,13 @@ ath_rcv_dev_event(struct notifier_block +@@ -12729,8 +12747,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); diff --git a/package/madwifi/patches/434-name-alloc-fix.patch b/package/madwifi/patches/434-name-alloc-fix.patch index b3bb30067a..ab277630de 100644 --- a/package/madwifi/patches/434-name-alloc-fix.patch +++ b/package/madwifi/patches/434-name-alloc-fix.patch @@ -1,7 +1,6 @@ -diff -ur madwifi-trunk-r3314/ath/if_ath_ahb.c madwifi-trunk-r3314.patched/ath/if_ath_ahb.c ---- madwifi-trunk-r3314/ath/if_ath_ahb.c 2009-05-17 22:16:05.000000000 +0300 -+++ madwifi-trunk-r3314.patched/ath/if_ath_ahb.c 2009-05-17 22:15:47.000000000 +0300 -@@ -376,6 +376,11 @@ +--- a/ath/if_ath_ahb.c ++++ b/ath/if_ath_ahb.c +@@ -311,6 +311,11 @@ init_ath_wmac(u_int16_t devid, u_int16_t SET_MODULE_OWNER(dev); sclist[wlanNum] = sc; @@ -13,10 +12,9 @@ diff -ur madwifi-trunk-r3314/ath/if_ath_ahb.c madwifi-trunk-r3314.patched/ath/if switch (wlanNum) { case AR531X_WLAN0_NUM: if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) || -diff -ur madwifi-trunk-r3314/ath/if_ath_pci.c madwifi-trunk-r3314.patched/ath/if_ath_pci.c ---- madwifi-trunk-r3314/ath/if_ath_pci.c 2009-05-17 22:16:05.000000000 +0300 -+++ madwifi-trunk-r3314.patched/ath/if_ath_pci.c 2009-05-17 22:15:47.000000000 +0300 -@@ -209,6 +209,11 @@ +--- a/ath/if_ath_pci.c ++++ b/ath/if_ath_pci.c +@@ -236,6 +236,11 @@ ath_pci_probe(struct pci_dev *pdev, cons */ sc->aps_sc.sc_invalid = 1; diff --git a/package/madwifi/patches/436-injection_checks.patch b/package/madwifi/patches/436-injection_checks.patch index 7bdd82c0f9..d071d37f95 100644 --- a/package/madwifi/patches/436-injection_checks.patch +++ b/package/madwifi/patches/436-injection_checks.patch @@ -1,6 +1,6 @@ --- a/ath/if_ath.c +++ b/ath/if_ath.c -@@ -3199,7 +3199,13 @@ ath_tx_startraw(struct net_device *dev, +@@ -3200,7 +3200,13 @@ ath_tx_startraw(struct net_device *dev, struct ieee80211_frame *wh; wh = (struct ieee80211_frame *)skb->data; @@ -14,7 +14,7 @@ rt = sc->sc_currates; txrate = dot11_to_ratecode(sc, rt, ph->rate0); power = ph->power > 63 ? 63 : ph->power; -@@ -3224,7 +3230,8 @@ ath_tx_startraw(struct net_device *dev, +@@ -3225,7 +3231,8 @@ ath_tx_startraw(struct net_device *dev, rt = sc->sc_currates; KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); diff --git a/package/madwifi/patches/437-sysctl_cleanup.patch b/package/madwifi/patches/437-sysctl_cleanup.patch new file mode 100644 index 0000000000..510c3a61c7 --- /dev/null +++ b/package/madwifi/patches/437-sysctl_cleanup.patch @@ -0,0 +1,73 @@ +--- a/ath/if_ath.c ++++ b/ath/if_ath.c +@@ -11019,38 +11019,38 @@ enum { + * mirrored in /proc/sys. + */ + enum { +- ATH_SLOTTIME = 1, +- ATH_ACKTIMEOUT = 2, +- ATH_CTSTIMEOUT = 3, +- ATH_SOFTLED = 4, +- ATH_LEDPIN = 5, +- ATH_COUNTRYCODE = 6, +- ATH_REGDOMAIN = 7, +- ATH_DEBUG = 8, +- ATH_TXANTENNA = 9, +- ATH_RXANTENNA = 10, +- ATH_DIVERSITY = 11, +- ATH_TXINTRPERIOD = 12, +- ATH_FFTXQMIN = 13, +- ATH_XR_POLL_PERIOD = 14, +- ATH_XR_POLL_COUNT = 15, +- ATH_ACKRATE = 16, +- ATH_RP = 17, +- ATH_RP_PRINT = 18, +- ATH_RP_PRINT_ALL = 19, +- ATH_RP_PRINT_MEM = 20, +- ATH_RP_PRINT_MEM_ALL = 21, +- ATH_RP_FLUSH = 22, +- ATH_PANIC = 23, +- ATH_RP_IGNORED = 24, +- ATH_RADAR_IGNORED = 25, +- ATH_MAXVAPS = 26, +- ATH_INTMIT = 27, +- ATH_NOISE_IMMUNITY = 28, +- ATH_OFDM_WEAK_DET = 29, +- ATH_CHANBW = 30, +- ATH_OUTDOOR = 31, +- ATH_DISTANCE = 32, ++ ATH_SLOTTIME, ++ ATH_ACKTIMEOUT, ++ ATH_CTSTIMEOUT, ++ ATH_SOFTLED, ++ ATH_LEDPIN, ++ ATH_COUNTRYCODE, ++ ATH_REGDOMAIN, ++ ATH_DEBUG, ++ ATH_TXANTENNA, ++ ATH_RXANTENNA, ++ ATH_DIVERSITY, ++ ATH_TXINTRPERIOD, ++ ATH_FFTXQMIN, ++ ATH_XR_POLL_PERIOD, ++ ATH_XR_POLL_COUNT, ++ ATH_ACKRATE, ++ ATH_RP, ++ ATH_RP_PRINT, ++ ATH_RP_PRINT_ALL, ++ ATH_RP_PRINT_MEM, ++ ATH_RP_PRINT_MEM_ALL, ++ ATH_RP_FLUSH, ++ ATH_PANIC, ++ ATH_RP_IGNORED, ++ ATH_RADAR_IGNORED, ++ ATH_MAXVAPS, ++ ATH_INTMIT, ++ ATH_NOISE_IMMUNITY, ++ ATH_OFDM_WEAK_DET, ++ ATH_CHANBW, ++ ATH_OUTDOOR, ++ ATH_DISTANCE, + }; + + /* diff --git a/package/madwifi/patches/438-poweroffset_sysctl.patch b/package/madwifi/patches/438-poweroffset_sysctl.patch new file mode 100644 index 0000000000..2a6d27cc5d --- /dev/null +++ b/package/madwifi/patches/438-poweroffset_sysctl.patch @@ -0,0 +1,43 @@ +--- a/ath/if_ath.c ++++ b/ath/if_ath.c +@@ -11029,6 +11029,7 @@ enum { + ATH_DEBUG, + ATH_TXANTENNA, + ATH_RXANTENNA, ++ ATH_POWEROFFSET, + ATH_DIVERSITY, + ATH_TXINTRPERIOD, + ATH_FFTXQMIN, +@@ -11309,6 +11310,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl + ath_debug_global = (val & ATH_DEBUG_GLOBAL); + #endif + break; ++ case ATH_POWEROFFSET: ++ sc->sc_poweroffset = val; ++ break; + case ATH_TXANTENNA: + /* + * antenna can be: +@@ -11476,6 +11480,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl + case ATH_DEBUG: + val = sc->sc_debug | ath_debug_global; + break; ++ case ATH_POWEROFFSET: ++ val = sc->sc_poweroffset; ++ break; + case ATH_TXANTENNA: + val = sc->sc_txantenna; + break; +@@ -11617,6 +11624,12 @@ static const ctl_table ath_sysctl_templa + }, + #endif + { .ctl_name = CTL_AUTO, ++ .procname = "poweroffset", ++ .mode = 0644, ++ .proc_handler = ath_sysctl_halparam, ++ .extra2 = (void *)ATH_POWEROFFSET, ++ }, ++ { .ctl_name = CTL_AUTO, + .procname = "txantenna", + .mode = 0644, + .proc_handler = ath_sysctl_halparam,