1 | Index: trunk/net80211/ieee80211.c
|
---|
2 | ===================================================================
|
---|
3 | --- trunk/net80211/ieee80211.c (revision 1183)
|
---|
4 | +++ trunk/net80211/ieee80211.c (working copy)
|
---|
5 | @@ -198,6 +198,7 @@
|
---|
6 | ic->ic_reset = ieee80211_default_reset;
|
---|
7 |
|
---|
8 | init_timer(&ic->ic_slowtimo);
|
---|
9 | + ic->ic_calint = 30; //set the initial value for calibration interval to 30
|
---|
10 | ic->ic_slowtimo.data = (unsigned long) ic;
|
---|
11 | ic->ic_slowtimo.function = ieee80211_watchdog;
|
---|
12 | ieee80211_watchdog((unsigned long) ic); /* prime timer */
|
---|
13 | Index: trunk/net80211/ieee80211_ioctl.h
|
---|
14 | ===================================================================
|
---|
15 | --- trunk/net80211/ieee80211_ioctl.h (revision 1183)
|
---|
16 | +++ trunk/net80211/ieee80211_ioctl.h (working copy)
|
---|
17 | @@ -498,6 +498,7 @@
|
---|
18 | IEEE80211_PARAM_IBSS = 26, /* pseudo ad-hoc mode or standard IBSS mode */
|
---|
19 | IEEE80211_PARAM_PUREG = 27, /* pure or mixed G */
|
---|
20 | IEEE80211_PARAM_WDSONLY = 28, /* only wds traffic allowed */
|
---|
21 | + IEEE80211_PARAM_CALINT = 29, /* Calibration Interval */
|
---|
22 | IEEE80211_PARAM_RESET = 99 /* reset the device */
|
---|
23 | };
|
---|
24 |
|
---|
25 | Index: trunk/net80211/ieee80211_node.h
|
---|
26 | ===================================================================
|
---|
27 | --- trunk/net80211/ieee80211_node.h (revision 1183)
|
---|
28 | +++ trunk/net80211/ieee80211_node.h (working copy)
|
---|
29 | @@ -51,6 +51,9 @@
|
---|
30 | * authorized. The latter timeout is shorter to more aggressively
|
---|
31 | * reclaim nodes that leave part way through the 802.1x exchange.
|
---|
32 | */
|
---|
33 | +//-------------------------------------------------------------------------------------
|
---|
34 | +#define IEEE80211_DISABLE_CAL -1
|
---|
35 | +//-------------------------------------------------------------------------------------
|
---|
36 | #define IEEE80211_INACT_WAIT 15 /* inactivity interval (secs) */
|
---|
37 | #define IEEE80211_INACT_INIT (30/IEEE80211_INACT_WAIT) /* initial */
|
---|
38 | #define IEEE80211_INACT_AUTH (180/IEEE80211_INACT_WAIT) /* associated but not authorized */
|
---|
39 | Index: trunk/net80211/ieee80211_wireless.c
|
---|
40 | ===================================================================
|
---|
41 | --- trunk/net80211/ieee80211_wireless.c (revision 1183)
|
---|
42 | +++ trunk/net80211/ieee80211_wireless.c (working copy)
|
---|
43 | @@ -1611,6 +1611,16 @@
|
---|
44 | case IEEE80211_PARAM_WDSONLY:
|
---|
45 | ic->ic_wdsonly = value;
|
---|
46 | break;
|
---|
47 | +//---------------------------------------------------------------------------------
|
---|
48 | + case IEEE80211_PARAM_CALINT:
|
---|
49 | + if(value == IEEE80211_DISABLE_CAL)
|
---|
50 | + {
|
---|
51 | + ic->ic_calint = -1;
|
---|
52 | + }
|
---|
53 | + else
|
---|
54 | + ic->ic_calint = value;
|
---|
55 | + break;
|
---|
56 | +//----------------------------------------------------------------------------------
|
---|
57 | case IEEE80211_PARAM_RESET:
|
---|
58 | ic->ic_init(ic->ic_dev);
|
---|
59 | break;
|
---|
60 | @@ -1751,6 +1761,11 @@
|
---|
61 | case IEEE80211_PARAM_WDSONLY:
|
---|
62 | param[0] = ic->ic_wdsonly;
|
---|
63 | break;
|
---|
64 | + //---------------------------------------------------------
|
---|
65 | + case IEEE80211_PARAM_CALINT:
|
---|
66 | + param[0] = ic->ic_calint;
|
---|
67 | + break;
|
---|
68 | + //-------------------------------------------------------
|
---|
69 | default:
|
---|
70 | return -EOPNOTSUPP;
|
---|
71 | }
|
---|
72 | @@ -2368,6 +2383,10 @@
|
---|
73 | IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wdsonly" },
|
---|
74 | { IEEE80211_PARAM_WDSONLY,
|
---|
75 | 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_wdsonly" },
|
---|
76 | + { IEEE80211_PARAM_CALINT,
|
---|
77 | + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "calint" },
|
---|
78 | + { IEEE80211_PARAM_CALINT,
|
---|
79 | + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_calint" },
|
---|
80 | { IEEE80211_PARAM_RESET,
|
---|
81 | IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "reset" },
|
---|
82 | #endif /* WIRELESS_EXT >= 12 */
|
---|
83 | Index: trunk/net80211/ieee80211_var.h
|
---|
84 | ===================================================================
|
---|
85 | --- trunk/net80211/ieee80211_var.h (revision 1183)
|
---|
86 | +++ trunk/net80211/ieee80211_var.h (working copy)
|
---|
87 | @@ -214,6 +214,10 @@
|
---|
88 | struct net_device *ic_wdsdev[IEEE80211_WDS_MAXNODES];
|
---|
89 | /* only wds traffic is allowed */
|
---|
90 | int ic_wdsonly;
|
---|
91 | +//-------------------------------------------------------------------------------------------------------
|
---|
92 | + /*Calibration Interval*/
|
---|
93 | + int ic_calint;
|
---|
94 | +//-------------------------------------------------------------------------------------------------------
|
---|
95 | };
|
---|
96 |
|
---|
97 | #define IEEE80211_ADDR_EQ(a1,a2) (memcmp(a1,a2,IEEE80211_ADDR_LEN) == 0)
|
---|
98 | Index: trunk/ath/if_ath.c
|
---|
99 | ===================================================================
|
---|
100 | --- trunk/ath/if_ath.c (revision 1183)
|
---|
101 | +++ trunk/ath/if_ath.c (working copy)
|
---|
102 | @@ -5359,9 +5359,11 @@
|
---|
103 | struct net_device *dev = (struct net_device *) arg;
|
---|
104 | struct ath_softc *sc = dev->priv;
|
---|
105 | struct ath_hal *ah = sc->sc_ah;
|
---|
106 | -
|
---|
107 | + struct ieee80211com *ic = &sc->sc_ic;
|
---|
108 | +
|
---|
109 | + int calinterval = ic->ic_calint;
|
---|
110 | sc->sc_stats.ast_per_cal++;
|
---|
111 | -
|
---|
112 | +
|
---|
113 | DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: channel %u/%x\n",
|
---|
114 | __func__, sc->sc_curchan.channel, sc->sc_curchan.channelFlags);
|
---|
115 |
|
---|
116 | @@ -5381,8 +5383,18 @@
|
---|
117 | __func__, sc->sc_curchan.channel);
|
---|
118 | sc->sc_stats.ast_per_calfail++;
|
---|
119 | }
|
---|
120 | - sc->sc_cal_ch.expires = jiffies + (ath_calinterval * HZ);
|
---|
121 | - add_timer(&sc->sc_cal_ch);
|
---|
122 | + DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: calint %d\n",
|
---|
123 | + __func__, ath_calinterval);
|
---|
124 | + //printk("Periodic Recalibration Taking place %d", jiffies);
|
---|
125 | + if(calinterval >=0)
|
---|
126 | + {
|
---|
127 | + sc->sc_cal_ch.expires = jiffies + (calinterval * HZ);
|
---|
128 | + add_timer(&sc->sc_cal_ch);
|
---|
129 | + }
|
---|
130 | + else
|
---|
131 | + {
|
---|
132 | + //printk("Since calinterval is -1, stopping periodic calibration\n");
|
---|
133 | + }
|
---|
134 | }
|
---|
135 |
|
---|
136 | static int
|
---|
137 | @@ -5392,6 +5404,7 @@
|
---|
138 | struct ath_softc *sc = dev->priv;
|
---|
139 | struct ath_hal *ah = sc->sc_ah;
|
---|
140 | struct ieee80211_node *ni;
|
---|
141 | + //int ath_calinterval;
|
---|
142 | int i, error;
|
---|
143 | const u_int8_t *bssid;
|
---|
144 | u_int32_t rfilt;
|
---|
145 | @@ -5413,7 +5426,7 @@
|
---|
146 | netif_stop_queue(dev); /* before we do anything else */
|
---|
147 | if (sc->sc_rawdev_enabled)
|
---|
148 | netif_stop_queue(&sc->sc_rawdev);
|
---|
149 | -
|
---|
150 | + //ath_calinterval = ic->ic_calint;
|
---|
151 | if (nstate == IEEE80211_S_INIT) {
|
---|
152 | sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS);
|
---|
153 | /*
|
---|
154 | @@ -5521,7 +5534,7 @@
|
---|
155 | */
|
---|
156 | if (nstate == IEEE80211_S_RUN) {
|
---|
157 | /* start periodic recalibration timer */
|
---|
158 | - mod_timer(&sc->sc_cal_ch, jiffies + (ath_calinterval * HZ));
|
---|
159 | + mod_timer(&sc->sc_cal_ch, jiffies + (ath_calinterval * HZ));
|
---|
160 | } else if (nstate == IEEE80211_S_SCAN) {
|
---|
161 | /* start ap/neighbor scan timer */
|
---|
162 | mod_timer(&sc->sc_scan_ch,
|
---|
163 |
|
---|