brcmfmac: use local iftype avoiding use-after-free of virtual interface
[linux-2.6-block.git] / drivers / net / ethernet / broadcom / bgmac.h
index 248727dc62f22c2ae2aa6f640f1b2cf91230a133..6d1c6ff1ed963ef6bd672b8cd792b7b529c09b27 100644 (file)
 /* BCMA GMAC core specific IO Control (BCMA_IOCTL) flags */
 #define BGMAC_BCMA_IOCTL_SW_CLKEN              0x00000004      /* PHY Clock Enable */
 #define BGMAC_BCMA_IOCTL_SW_RESET              0x00000008      /* PHY Reset */
+/* The IOCTL values appear to be different in NS, NSP, and NS2, and do not match
+ * the values directly above
+ */
+#define BGMAC_CLK_EN                           BIT(0)
+#define BGMAC_RESERVED_0                       BIT(1)
+#define BGMAC_SOURCE_SYNC_MODE_EN              BIT(2)
+#define BGMAC_DEST_SYNC_MODE_EN                        BIT(3)
+#define BGMAC_TX_CLK_OUT_INVERT_EN             BIT(4)
+#define BGMAC_DIRECT_GMII_MODE                 BIT(5)
+#define BGMAC_CLK_250_SEL                      BIT(6)
+#define BGMAC_AWCACHE                          (0xf << 7)
+#define BGMAC_RESERVED_1                       (0x1f << 11)
+#define BGMAC_ARCACHE                          (0xf << 16)
+#define BGMAC_AWUSER                           (0x3f << 20)
+#define BGMAC_ARUSER                           (0x3f << 26)
+#define BGMAC_RESERVED                         BIT(31)
 
 /* BCMA GMAC core specific IO status (BCMA_IOST) flags */
 #define BGMAC_BCMA_IOST_ATTACHED               0x00000800