  
  	return 0;
  }
-@@ -1981,6 +2031,138 @@ static int ath9k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+@@ -1981,6 +2029,138 @@ static int ath9k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
  	return 0;
  }
  
-+#ifdef TID_SLEEPING	
++#ifdef CPTCFG_ATH9K_TID_SLEEPING	
 +
 +static int ath9k_tid_sleep_mode(char * tid_sleep_data_ptr, 
 +                        u8 tid_sleep_data_len)

+        }
+        if(num_entries==0) /*Allow nothing, set everything to sleep*/
+        {
+#ifdef TID_SLEEPING_DEBUG               
+            printk("Global Sleep Mode Activated!\n");
+            printk("Putting all STAs and all their TIDs into sleep mode\n");
+#endif            

 
 		if (!tid->sched)
 			continue;
@@ -1481,16 +1521,121 @@ void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
 	}
 }
 
+#ifdef CPTCFG_ATH9K_TID_SLEEPING	
+void ath_tx_aggr_sleep_tid_sleep(struct ieee80211_sta *sta, 
+    struct ath_softc *sc, struct ath_node *an)
+{
