logo       
Google Custom Search
    AddThis Social Bookmark Button

revision 2552 committed: msg#00025

Subject: revision 2552 committed
Project     : madwifi
Revision    : 2552
Author      : proski (Pavel Roskin)
Date        : 2007-07-06 05:58:57 +0200 (Fri, 06 Jul 2007)

Log Message :
Get rid of GET_ATH_SOFTC

Instead, replace HAL_SOFTC in ah_osdep.h so that it's always a structure
pointer.

Affected Files:
* trunk/ath/if_ath_hal_macros.h                       updated             
* trunk/ath_hal/ah_osdep.h                            updated             
* trunk/scripts/if_ath_hal_generator.pl               updated             


Modified: trunk/ath/if_ath_hal_macros.h
===================================================================
--- trunk/ath/if_ath_hal_macros.h       2007-07-06 03:37:43 UTC (rev 2551)
+++ trunk/ath/if_ath_hal_macros.h       2007-07-06 03:58:57 UTC (rev 2552)
@@ -50,7 +50,6 @@
 #ifndef _IF_ATH_HAL_MACROS_H_
 #define _IF_ATH_HAL_MACROS_H_
 
-#define GET_ATH_SOFTC(_ah)     ((struct ath_softc*)(_ah->ah_sc))
 #define ATH_HAL_LOCK_INIT(_sc)         spin_lock_init(&(_sc)->sc_hal_lock)
 #define ATH_HAL_LOCK_DESTROY(_sc)
 #define ATH_HAL_LOCK_IRQ(_sc)  do { \

Modified: trunk/ath_hal/ah_osdep.h
===================================================================
--- trunk/ath_hal/ah_osdep.h    2007-07-06 03:37:43 UTC (rev 2551)
+++ trunk/ath_hal/ah_osdep.h    2007-07-06 03:58:57 UTC (rev 2552)
@@ -54,6 +54,9 @@
 #define        __packed        __attribute__((__packed__))
 #endif
 
+/* Safer HAL_SOFTC definition */
+#define HAL_SOFTC struct ath_softc *
+
 /* Replace non-annotated HAL_BUS_HANDLE from ah.h */
 typedef void __iomem* ath_iomem_t;
 #define HAL_BUS_HANDLE ath_iomem_t

Modified: trunk/scripts/if_ath_hal_generator.pl
===================================================================
--- trunk/scripts/if_ath_hal_generator.pl       2007-07-06 03:37:43 UTC (rev 
2551)
+++ trunk/scripts/if_ath_hal_generator.pl       2007-07-06 03:58:57 UTC (rev 
2552)
@@ -373,7 +373,7 @@
    if(! ($api_return_type =~ /void/ )) {
       print ATH_HAL_API_H "\n\t" . $api_return_type . " ret;";
    }
-   print ATH_HAL_API_H "\n\tATH_HAL_LOCK_IRQ(GET_ATH_SOFTC(ah));";
+   print ATH_HAL_API_H "\n\tATH_HAL_LOCK_IRQ(ah->ah_sc);";
    print ATH_HAL_API_H "\n\t";
    if(! ($api_return_type =~ /void/ )) {
       print ATH_HAL_API_H "ret = ";
@@ -387,7 +387,7 @@
       print ATH_HAL_API_H $names[$j];
    }
    print ATH_HAL_API_H ");";
-   print ATH_HAL_API_H "\n\tATH_HAL_UNLOCK_IRQ(GET_ATH_SOFTC(ah));";
+   print ATH_HAL_API_H "\n\tATH_HAL_UNLOCK_IRQ(ah->ah_sc);";
    if(! ($api_return_type =~ /void/ )) {
       print ATH_HAL_API_H "\n\treturn ret;";
    }

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>