Index: trunk/net80211/ieee80211.c
===================================================================
--- trunk/net80211/ieee80211.c	(revision 1183)
+++ trunk/net80211/ieee80211.c	(working copy)
@@ -198,6 +198,7 @@
 		ic->ic_reset = ieee80211_default_reset;
 
 	init_timer(&ic->ic_slowtimo);
+        ic->ic_calint = 30; //set the initial value for calibration interval to 30
 	ic->ic_slowtimo.data = (unsigned long) ic;
 	ic->ic_slowtimo.function = ieee80211_watchdog;
 	ieee80211_watchdog((unsigned long) ic);		/* prime timer */
Index: trunk/net80211/ieee80211_ioctl.h
===================================================================
--- trunk/net80211/ieee80211_ioctl.h	(revision 1183)
+++ trunk/net80211/ieee80211_ioctl.h	(working copy)
@@ -498,6 +498,7 @@
 	IEEE80211_PARAM_IBSS		= 26,	/* pseudo ad-hoc mode or standard IBSS mode */
 	IEEE80211_PARAM_PUREG		= 27,	/* pure or mixed G */
 	IEEE80211_PARAM_WDSONLY		= 28,	/* only wds traffic allowed */
+        IEEE80211_PARAM_CALINT          = 29,   /* Calibration Interval */
 	IEEE80211_PARAM_RESET		= 99    /* reset the device */
 };
 
Index: trunk/net80211/ieee80211_node.h
===================================================================
--- trunk/net80211/ieee80211_node.h	(revision 1183)
+++ trunk/net80211/ieee80211_node.h	(working copy)
@@ -51,6 +51,9 @@
  * authorized.  The latter timeout is shorter to more aggressively
  * reclaim nodes that leave part way through the 802.1x exchange.
  */
+//-------------------------------------------------------------------------------------
+#define IEEE80211_DISABLE_CAL   -1
+//-------------------------------------------------------------------------------------
 #define	IEEE80211_INACT_WAIT	15		/* inactivity interval (secs) */
 #define	IEEE80211_INACT_INIT	(30/IEEE80211_INACT_WAIT)	/* initial */
 #define	IEEE80211_INACT_AUTH	(180/IEEE80211_INACT_WAIT)	/* associated but not authorized */
Index: trunk/net80211/ieee80211_wireless.c
===================================================================
--- trunk/net80211/ieee80211_wireless.c	(revision 1183)
+++ trunk/net80211/ieee80211_wireless.c	(working copy)
@@ -1611,6 +1611,16 @@
 	case IEEE80211_PARAM_WDSONLY:
 		ic->ic_wdsonly = value;
 		break;
+//---------------------------------------------------------------------------------
+        case IEEE80211_PARAM_CALINT:
+               if(value == IEEE80211_DISABLE_CAL)
+                {  
+                           ic->ic_calint = -1;
+                }
+                else 
+                	ic->ic_calint = value;
+                break;
+//----------------------------------------------------------------------------------
 	case IEEE80211_PARAM_RESET:
 		ic->ic_init(ic->ic_dev);
 		break;
@@ -1751,6 +1761,11 @@
 	case IEEE80211_PARAM_WDSONLY:
 		param[0] = ic->ic_wdsonly;
 		break;
+    //---------------------------------------------------------
+        case IEEE80211_PARAM_CALINT:
+                param[0] = ic->ic_calint;
+                break;
+   //-------------------------------------------------------    
 	default:
 		return -EOPNOTSUPP;
 	}
@@ -2368,6 +2383,10 @@
 	  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "wdsonly" },
 	{ IEEE80211_PARAM_WDSONLY,
 	  0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_wdsonly" },
+	{ IEEE80211_PARAM_CALINT,
+	  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "calint" },
+	{ IEEE80211_PARAM_CALINT,
+	  0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_calint" },
 	{ IEEE80211_PARAM_RESET,
 	  IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "reset" },
 #endif /* WIRELESS_EXT >= 12 */
Index: trunk/net80211/ieee80211_var.h
===================================================================
--- trunk/net80211/ieee80211_var.h	(revision 1183)
+++ trunk/net80211/ieee80211_var.h	(working copy)
@@ -214,6 +214,10 @@
 	struct net_device	*ic_wdsdev[IEEE80211_WDS_MAXNODES];
 	/* only wds traffic is allowed */
 	int			ic_wdsonly;
+//-------------------------------------------------------------------------------------------------------
+        /*Calibration Interval*/
+	int                     ic_calint;
+//-------------------------------------------------------------------------------------------------------
 };
 
 #define	IEEE80211_ADDR_EQ(a1,a2)	(memcmp(a1,a2,IEEE80211_ADDR_LEN) == 0)
Index: trunk/ath/if_ath.c
===================================================================
--- trunk/ath/if_ath.c	(revision 1183)
+++ trunk/ath/if_ath.c	(working copy)
@@ -5359,9 +5359,11 @@
 	struct net_device *dev = (struct net_device *) arg;
 	struct ath_softc *sc = dev->priv;
 	struct ath_hal *ah = sc->sc_ah;
-
+	struct ieee80211com *ic = &sc->sc_ic;
+        
+        int calinterval = ic->ic_calint;
 	sc->sc_stats.ast_per_cal++;
-
+         
 	DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: channel %u/%x\n",
 		__func__, sc->sc_curchan.channel, sc->sc_curchan.channelFlags);
 
@@ -5381,8 +5383,18 @@
 			__func__, sc->sc_curchan.channel);
 		sc->sc_stats.ast_per_calfail++;
 	}
-	sc->sc_cal_ch.expires = jiffies + (ath_calinterval * HZ);
-	add_timer(&sc->sc_cal_ch);
+	DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: calint %d\n",
+		__func__, ath_calinterval);
+	//printk("Periodic Recalibration Taking place %d", jiffies);
+        if(calinterval >=0)
+        {
+	   sc->sc_cal_ch.expires = jiffies + (calinterval * HZ);
+	   add_timer(&sc->sc_cal_ch);
+        }
+	else
+	{
+		//printk("Since calinterval is -1, stopping periodic calibration\n");
+	}
 }
 
 static int
@@ -5392,6 +5404,7 @@
 	struct ath_softc *sc = dev->priv;
 	struct ath_hal *ah = sc->sc_ah;
 	struct ieee80211_node *ni;
+	//int ath_calinterval;
 	int i, error;
 	const u_int8_t *bssid;
 	u_int32_t rfilt;
@@ -5413,7 +5426,7 @@
 	netif_stop_queue(dev);			/* before we do anything else */
 	if (sc->sc_rawdev_enabled)
 		netif_stop_queue(&sc->sc_rawdev);
-
+        //ath_calinterval = ic->ic_calint;
 	if (nstate == IEEE80211_S_INIT) {
 		sc->sc_imask &= ~(HAL_INT_SWBA | HAL_INT_BMISS);
 		/*
@@ -5521,7 +5534,7 @@
 	 */
 	if (nstate == IEEE80211_S_RUN) {
 		/* start periodic recalibration timer */
-		mod_timer(&sc->sc_cal_ch, jiffies + (ath_calinterval * HZ));
+	        mod_timer(&sc->sc_cal_ch, jiffies + (ath_calinterval * HZ));
 	} else if (nstate == IEEE80211_S_SCAN) {
 		/* start ap/neighbor scan timer */
 		mod_timer(&sc->sc_scan_ch,

