aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_cmds.h
diff options
context:
space:
mode:
authorSathya Perla <sathyap@serverengines.com>2009-07-27 18:52:03 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-02 02:06:20 -0400
commit8788fdc2a53cf012a43808877eaa6ac7e3c923b4 (patch)
treeef62e30494ee1aaced18250ddb7295ff0bb28f7a /drivers/net/benet/be_cmds.h
parent2f6d7c1b34403b97fa57473edcb6749d1db5ace3 (diff)
be2net: get rid of be_ctrl_info struct/abstraction
Currently only the be_ctrl_info struct ptr (instead of adapter) is passed to all the routines in be_cmds.c. Instead pass be_adapter ptr to allow access to all its fields. Merge the contents of struct be_ctrl_info into be_adapter. The resulting code is simpler. Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_cmds.h')
-rw-r--r--drivers/net/benet/be_cmds.h51
1 files changed, 25 insertions, 26 deletions
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index 747626da7b4e..164ab9277829 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -634,7 +634,6 @@ struct be_cmd_resp_link_status {
634} __packed; 634} __packed;
635 635
636/******************** Get FW Version *******************/ 636/******************** Get FW Version *******************/
637#define FW_VER_LEN 32
638struct be_cmd_req_get_fw_version { 637struct be_cmd_req_get_fw_version {
639 struct be_cmd_req_hdr hdr; 638 struct be_cmd_req_hdr hdr;
640 u8 rsvd0[FW_VER_LEN]; 639 u8 rsvd0[FW_VER_LEN];
@@ -697,52 +696,52 @@ struct be_cmd_resp_query_fw_cfg {
697 u32 rsvd[26]; 696 u32 rsvd[26];
698}; 697};
699 698
700extern int be_pci_fnum_get(struct be_ctrl_info *ctrl); 699extern int be_pci_fnum_get(struct be_adapter *adapter);
701extern int be_cmd_POST(struct be_ctrl_info *ctrl); 700extern int be_cmd_POST(struct be_adapter *adapter);
702extern int be_cmd_mac_addr_query(struct be_ctrl_info *ctrl, u8 *mac_addr, 701extern int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
703 u8 type, bool permanent, u32 if_handle); 702 u8 type, bool permanent, u32 if_handle);
704extern int be_cmd_pmac_add(struct be_ctrl_info *ctrl, u8 *mac_addr, 703extern int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr,
705 u32 if_id, u32 *pmac_id); 704 u32 if_id, u32 *pmac_id);
706extern int be_cmd_pmac_del(struct be_ctrl_info *ctrl, u32 if_id, u32 pmac_id); 705extern int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id);
707extern int be_cmd_if_create(struct be_ctrl_info *ctrl, u32 if_flags, u8 *mac, 706extern int be_cmd_if_create(struct be_adapter *adapter, u32 if_flags, u8 *mac,
708 bool pmac_invalid, u32 *if_handle, u32 *pmac_id); 707 bool pmac_invalid, u32 *if_handle, u32 *pmac_id);
709extern int be_cmd_if_destroy(struct be_ctrl_info *ctrl, u32 if_handle); 708extern int be_cmd_if_destroy(struct be_adapter *adapter, u32 if_handle);
710extern int be_cmd_eq_create(struct be_ctrl_info *ctrl, 709extern int be_cmd_eq_create(struct be_adapter *adapter,
711 struct be_queue_info *eq, int eq_delay); 710 struct be_queue_info *eq, int eq_delay);
712extern int be_cmd_cq_create(struct be_ctrl_info *ctrl, 711extern int be_cmd_cq_create(struct be_adapter *adapter,
713 struct be_queue_info *cq, struct be_queue_info *eq, 712 struct be_queue_info *cq, struct be_queue_info *eq,
714 bool sol_evts, bool no_delay, 713 bool sol_evts, bool no_delay,
715 int num_cqe_dma_coalesce); 714 int num_cqe_dma_coalesce);
716extern int be_cmd_mccq_create(struct be_ctrl_info *ctrl, 715extern int be_cmd_mccq_create(struct be_adapter *adapter,
717 struct be_queue_info *mccq, 716 struct be_queue_info *mccq,
718 struct be_queue_info *cq); 717 struct be_queue_info *cq);
719extern int be_cmd_txq_create(struct be_ctrl_info *ctrl, 718extern int be_cmd_txq_create(struct be_adapter *adapter,
720 struct be_queue_info *txq, 719 struct be_queue_info *txq,
721 struct be_queue_info *cq); 720 struct be_queue_info *cq);
722extern int be_cmd_rxq_create(struct be_ctrl_info *ctrl, 721extern int be_cmd_rxq_create(struct be_adapter *adapter,
723 struct be_queue_info *rxq, u16 cq_id, 722 struct be_queue_info *rxq, u16 cq_id,
724 u16 frag_size, u16 max_frame_size, u32 if_id, 723 u16 frag_size, u16 max_frame_size, u32 if_id,
725 u32 rss); 724 u32 rss);
726extern int be_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, 725extern int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
727 int type); 726 int type);
728extern int be_cmd_link_status_query(struct be_ctrl_info *ctrl, 727extern int be_cmd_link_status_query(struct be_adapter *adapter,
729 bool *link_up); 728 bool *link_up);
730extern int be_cmd_reset(struct be_ctrl_info *ctrl); 729extern int be_cmd_reset(struct be_adapter *adapter);
731extern int be_cmd_get_stats(struct be_ctrl_info *ctrl, 730extern int be_cmd_get_stats(struct be_adapter *adapter,
732 struct be_dma_mem *nonemb_cmd); 731 struct be_dma_mem *nonemb_cmd);
733extern int be_cmd_get_fw_ver(struct be_ctrl_info *ctrl, char *fw_ver); 732extern int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver);
734 733
735extern int be_cmd_modify_eqd(struct be_ctrl_info *ctrl, u32 eq_id, u32 eqd); 734extern int be_cmd_modify_eqd(struct be_adapter *adapter, u32 eq_id, u32 eqd);
736extern int be_cmd_vlan_config(struct be_ctrl_info *ctrl, u32 if_id, 735extern int be_cmd_vlan_config(struct be_adapter *adapter, u32 if_id,
737 u16 *vtag_array, u32 num, bool untagged, 736 u16 *vtag_array, u32 num, bool untagged,
738 bool promiscuous); 737 bool promiscuous);
739extern int be_cmd_promiscuous_config(struct be_ctrl_info *ctrl, 738extern int be_cmd_promiscuous_config(struct be_adapter *adapter,
740 u8 port_num, bool en); 739 u8 port_num, bool en);
741extern int be_cmd_multicast_set(struct be_ctrl_info *ctrl, u32 if_id, 740extern int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
742 struct dev_mc_list *mc_list, u32 mc_count); 741 struct dev_mc_list *mc_list, u32 mc_count);
743extern int be_cmd_set_flow_control(struct be_ctrl_info *ctrl, 742extern int be_cmd_set_flow_control(struct be_adapter *adapter,
744 u32 tx_fc, u32 rx_fc); 743 u32 tx_fc, u32 rx_fc);
745extern int be_cmd_get_flow_control(struct be_ctrl_info *ctrl, 744extern int be_cmd_get_flow_control(struct be_adapter *adapter,
746 u32 *tx_fc, u32 *rx_fc); 745 u32 *tx_fc, u32 *rx_fc);
747extern int be_cmd_query_fw_cfg(struct be_ctrl_info *ctrl, u32 *port_num); 746extern int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num);
748extern void be_process_mcc(struct be_ctrl_info *ctrl); 747extern void be_process_mcc(struct be_adapter *adapter);