ath9k: move few descriptor macros to ath9k.h
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Tue, 28 Jun 2011 12:00:54 +0000 (17:30 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 29 Jun 2011 19:11:04 +0000 (15:11 -0400)
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/init.c

index 56a0ac4ddc6249f93680615098083a75be89e084..964fb971fd6a6add64f907f5512f45d8fc8b3c09 100644 (file)
@@ -100,6 +100,11 @@ enum buffer_type {
 
 #define ATH_TXSTATUS_RING_SIZE 64
 
+#define        DS2PHYS(_dd, _ds)                                               \
+       ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc))
+#define ATH_DESC_4KB_BOUND_CHECK(_daddr) ((((_daddr) & 0xFFF) > 0xF7F) ? 1 : 0)
+#define ATH_DESC_4KB_BOUND_NUM_SKIPPED(_len) ((_len) / 4096)
+
 struct ath_descdma {
        void *dd_desc;
        dma_addr_t dd_desc_paddr;
index 50103b2792b5b72455e760f1d838c0b785bf7b61..ce297173e0d30c16c54d86effb617a1995b9a15f 100644 (file)
@@ -298,10 +298,6 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
                      struct list_head *head, const char *name,
                      int nbuf, int ndesc, bool is_tx)
 {
-#define        DS2PHYS(_dd, _ds)                                               \
-       ((_dd)->dd_desc_paddr + ((caddr_t)(_ds) - (caddr_t)(_dd)->dd_desc))
-#define ATH_DESC_4KB_BOUND_CHECK(_daddr) ((((_daddr) & 0xFFF) > 0xF7F) ? 1 : 0)
-#define ATH_DESC_4KB_BOUND_NUM_SKIPPED(_len) ((_len) / 4096)
        struct ath_common *common = ath9k_hw_common(sc->sc_ah);
        u8 *ds;
        struct ath_buf *bf;
@@ -396,9 +392,6 @@ fail2:
 fail:
        memset(dd, 0, sizeof(*dd));
        return error;
-#undef ATH_DESC_4KB_BOUND_CHECK
-#undef ATH_DESC_4KB_BOUND_NUM_SKIPPED
-#undef DS2PHYS
 }
 
 void ath9k_init_crypto(struct ath_softc *sc)