diff options
author | Sathya Perla <sathyap@serverengines.com> | 2009-07-27 18:52:03 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-02 02:06:20 -0400 |
commit | 8788fdc2a53cf012a43808877eaa6ac7e3c923b4 (patch) | |
tree | ef62e30494ee1aaced18250ddb7295ff0bb28f7a /drivers/net/benet/be_cmds.h | |
parent | 2f6d7c1b34403b97fa57473edcb6749d1db5ace3 (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.h | 51 |
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 | ||
638 | struct be_cmd_req_get_fw_version { | 637 | struct 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 | ||
700 | extern int be_pci_fnum_get(struct be_ctrl_info *ctrl); | 699 | extern int be_pci_fnum_get(struct be_adapter *adapter); |
701 | extern int be_cmd_POST(struct be_ctrl_info *ctrl); | 700 | extern int be_cmd_POST(struct be_adapter *adapter); |
702 | extern int be_cmd_mac_addr_query(struct be_ctrl_info *ctrl, u8 *mac_addr, | 701 | extern 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); |
704 | extern int be_cmd_pmac_add(struct be_ctrl_info *ctrl, u8 *mac_addr, | 703 | extern 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); |
706 | extern int be_cmd_pmac_del(struct be_ctrl_info *ctrl, u32 if_id, u32 pmac_id); | 705 | extern int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id); |
707 | extern int be_cmd_if_create(struct be_ctrl_info *ctrl, u32 if_flags, u8 *mac, | 706 | extern 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); |
709 | extern int be_cmd_if_destroy(struct be_ctrl_info *ctrl, u32 if_handle); | 708 | extern int be_cmd_if_destroy(struct be_adapter *adapter, u32 if_handle); |
710 | extern int be_cmd_eq_create(struct be_ctrl_info *ctrl, | 709 | extern 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); |
712 | extern int be_cmd_cq_create(struct be_ctrl_info *ctrl, | 711 | extern 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); |
716 | extern int be_cmd_mccq_create(struct be_ctrl_info *ctrl, | 715 | extern 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); |
719 | extern int be_cmd_txq_create(struct be_ctrl_info *ctrl, | 718 | extern 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); |
722 | extern int be_cmd_rxq_create(struct be_ctrl_info *ctrl, | 721 | extern 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); |
726 | extern int be_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, | 725 | extern int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q, |
727 | int type); | 726 | int type); |
728 | extern int be_cmd_link_status_query(struct be_ctrl_info *ctrl, | 727 | extern int be_cmd_link_status_query(struct be_adapter *adapter, |
729 | bool *link_up); | 728 | bool *link_up); |
730 | extern int be_cmd_reset(struct be_ctrl_info *ctrl); | 729 | extern int be_cmd_reset(struct be_adapter *adapter); |
731 | extern int be_cmd_get_stats(struct be_ctrl_info *ctrl, | 730 | extern int be_cmd_get_stats(struct be_adapter *adapter, |
732 | struct be_dma_mem *nonemb_cmd); | 731 | struct be_dma_mem *nonemb_cmd); |
733 | extern int be_cmd_get_fw_ver(struct be_ctrl_info *ctrl, char *fw_ver); | 732 | extern int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver); |
734 | 733 | ||
735 | extern int be_cmd_modify_eqd(struct be_ctrl_info *ctrl, u32 eq_id, u32 eqd); | 734 | extern int be_cmd_modify_eqd(struct be_adapter *adapter, u32 eq_id, u32 eqd); |
736 | extern int be_cmd_vlan_config(struct be_ctrl_info *ctrl, u32 if_id, | 735 | extern 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); |
739 | extern int be_cmd_promiscuous_config(struct be_ctrl_info *ctrl, | 738 | extern int be_cmd_promiscuous_config(struct be_adapter *adapter, |
740 | u8 port_num, bool en); | 739 | u8 port_num, bool en); |
741 | extern int be_cmd_multicast_set(struct be_ctrl_info *ctrl, u32 if_id, | 740 | extern 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); |
743 | extern int be_cmd_set_flow_control(struct be_ctrl_info *ctrl, | 742 | extern int be_cmd_set_flow_control(struct be_adapter *adapter, |
744 | u32 tx_fc, u32 rx_fc); | 743 | u32 tx_fc, u32 rx_fc); |
745 | extern int be_cmd_get_flow_control(struct be_ctrl_info *ctrl, | 744 | extern int be_cmd_get_flow_control(struct be_adapter *adapter, |
746 | u32 *tx_fc, u32 *rx_fc); | 745 | u32 *tx_fc, u32 *rx_fc); |
747 | extern int be_cmd_query_fw_cfg(struct be_ctrl_info *ctrl, u32 *port_num); | 746 | extern int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num); |
748 | extern void be_process_mcc(struct be_ctrl_info *ctrl); | 747 | extern void be_process_mcc(struct be_adapter *adapter); |