ifb: add performance flags
[linux-2.6.git] / drivers / net / ps3_gelic_net.h
index 46cfdcd..32521ae 100644 (file)
@@ -57,6 +57,8 @@
 #define GELIC_CARD_RX_PROTECTION_ERR         0x0000000004000000L
 #define GELIC_CARD_TX_TCP_UDP_CHECKSUM_ERR   0x0000000008000000L
 #define GELIC_CARD_PORT_STATUS_CHANGED       0x0000000020000000L
+#define GELIC_CARD_WLAN_EVENT_RECEIVED       0x0000000040000000L
+#define GELIC_CARD_WLAN_COMMAND_COMPLETED    0x0000000080000000L
        /* INT 0 */
 #define GELIC_CARD_TX_FLAGGED_DESCR          0x0004000000000000L
 #define GELIC_CARD_RX_FLAGGED_DESCR          0x0040000000000000L
@@ -180,6 +182,30 @@ enum gelic_lv1_net_control_code {
        GELIC_LV1_GET_ETH_PORT_STATUS   = 2,
        GELIC_LV1_SET_NEGOTIATION_MODE  = 3,
        GELIC_LV1_GET_VLAN_ID           = 4,
+       GELIC_LV1_SET_WOL               = 5,
+       GELIC_LV1_GET_CHANNEL           = 6,
+       GELIC_LV1_POST_WLAN_CMD         = 9,
+       GELIC_LV1_GET_WLAN_CMD_RESULT   = 10,
+       GELIC_LV1_GET_WLAN_EVENT        = 11,
+};
+
+/* for GELIC_LV1_SET_WOL */
+enum gelic_lv1_wol_command {
+       GELIC_LV1_WOL_MAGIC_PACKET      = 1,
+       GELIC_LV1_WOL_ADD_MATCH_ADDR    = 6,
+       GELIC_LV1_WOL_DELETE_MATCH_ADDR = 7,
+};
+
+/* for GELIC_LV1_WOL_MAGIC_PACKET */
+enum gelic_lv1_wol_mp_arg {
+       GELIC_LV1_WOL_MP_DISABLE        = 0,
+       GELIC_LV1_WOL_MP_ENABLE         = 1,
+};
+
+/* for GELIC_LV1_WOL_{ADD,DELETE}_MATCH_ADDR */
+enum gelic_lv1_wol_match_arg {
+       GELIC_LV1_WOL_MATCH_INDIVIDUAL  = 0,
+       GELIC_LV1_WOL_MATCH_ALL         = 1,
 };
 
 /* status returened from GET_ETH_PORT_STATUS */
@@ -191,24 +217,29 @@ enum gelic_lv1_ether_port_status {
        GELIC_LV1_ETHER_SPEED_10        = 0x0000000000000010L,
        GELIC_LV1_ETHER_SPEED_100       = 0x0000000000000020L,
        GELIC_LV1_ETHER_SPEED_1000      = 0x0000000000000040L,
-       GELIC_LV1_ETHER_SPEED_MASK      = 0x0000000000000070L
+       GELIC_LV1_ETHER_SPEED_MASK      = 0x0000000000000070L,
 };
 
 enum gelic_lv1_vlan_index {
        /* for outgoing packets */
-       GELIC_LV1_VLAN_TX_ETHERNET      = 0x0000000000000002L,
+       GELIC_LV1_VLAN_TX_ETHERNET_0    = 0x0000000000000002L,
        GELIC_LV1_VLAN_TX_WIRELESS      = 0x0000000000000003L,
+
        /* for incoming packets */
-       GELIC_LV1_VLAN_RX_ETHERNET      = 0x0000000000000012L,
-       GELIC_LV1_VLAN_RX_WIRELESS      = 0x0000000000000013L
+       GELIC_LV1_VLAN_RX_ETHERNET_0    = 0x0000000000000012L,
+       GELIC_LV1_VLAN_RX_WIRELESS      = 0x0000000000000013L,
+};
+
+enum gelic_lv1_phy {
+       GELIC_LV1_PHY_ETHERNET_0        = 0x0000000000000002L,
 };
 
 /* size of hardware part of gelic descriptor */
 #define GELIC_DESCR_SIZE       (32)
 
 enum gelic_port_type {
-       GELIC_PORT_ETHERNET = 0,
-       GELIC_PORT_WIRELESS = 1,
+       GELIC_PORT_ETHERNET_0   = 0,
+       GELIC_PORT_WIRELESS     = 1,
        GELIC_PORT_MAX
 };
 
@@ -272,10 +303,12 @@ struct gelic_card {
        wait_queue_head_t waitq;
 
        /* only first user should up the card */
-       struct semaphore updown_lock;
+       struct mutex updown_lock;
        atomic_t users;
 
        u64 ether_port_status;
+       int link_mode;
+
        /* original address returned by kzalloc */
        void *unalign;