aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/qlcnic/qlcnic.h7
-rw-r--r--drivers/net/qlcnic/qlcnic_hw.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index 4667463d5523..7af3c6ce0b68 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -898,6 +898,11 @@ struct qlcnic_mac_req {
898 u8 mac_addr[6]; 898 u8 mac_addr[6];
899}; 899};
900 900
901struct qlcnic_ipaddr {
902 __be32 ipv4;
903 __be32 ipv6[4];
904};
905
901#define QLCNIC_MSI_ENABLED 0x02 906#define QLCNIC_MSI_ENABLED 0x02
902#define QLCNIC_MSIX_ENABLED 0x04 907#define QLCNIC_MSIX_ENABLED 0x04
903#define QLCNIC_LRO_ENABLED 0x08 908#define QLCNIC_LRO_ENABLED 0x08
@@ -1286,7 +1291,7 @@ void qlcnic_free_mac_list(struct qlcnic_adapter *adapter);
1286int qlcnic_nic_set_promisc(struct qlcnic_adapter *adapter, u32); 1291int qlcnic_nic_set_promisc(struct qlcnic_adapter *adapter, u32);
1287int qlcnic_config_intr_coalesce(struct qlcnic_adapter *adapter); 1292int qlcnic_config_intr_coalesce(struct qlcnic_adapter *adapter);
1288int qlcnic_config_rss(struct qlcnic_adapter *adapter, int enable); 1293int qlcnic_config_rss(struct qlcnic_adapter *adapter, int enable);
1289int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, u32 ip, int cmd); 1294int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, __be32 ip, int cmd);
1290int qlcnic_linkevent_request(struct qlcnic_adapter *adapter, int enable); 1295int qlcnic_linkevent_request(struct qlcnic_adapter *adapter, int enable);
1291void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup); 1296void qlcnic_advert_link_change(struct qlcnic_adapter *adapter, int linkup);
1292 1297
diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c
index c198df90ff3c..68d56939a8d9 100644
--- a/drivers/net/qlcnic/qlcnic_hw.c
+++ b/drivers/net/qlcnic/qlcnic_hw.c
@@ -676,9 +676,10 @@ int qlcnic_config_rss(struct qlcnic_adapter *adapter, int enable)
676 return rv; 676 return rv;
677} 677}
678 678
679int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, u32 ip, int cmd) 679int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, __be32 ip, int cmd)
680{ 680{
681 struct qlcnic_nic_req req; 681 struct qlcnic_nic_req req;
682 struct qlcnic_ipaddr *ipa;
682 u64 word; 683 u64 word;
683 int rv; 684 int rv;
684 685
@@ -689,7 +690,8 @@ int qlcnic_config_ipaddr(struct qlcnic_adapter *adapter, u32 ip, int cmd)
689 req.req_hdr = cpu_to_le64(word); 690 req.req_hdr = cpu_to_le64(word);
690 691
691 req.words[0] = cpu_to_le64(cmd); 692 req.words[0] = cpu_to_le64(cmd);
692 req.words[1] = cpu_to_le64(ip); 693 ipa = (struct qlcnic_ipaddr *)&req.words[1];
694 ipa->ipv4 = ip;
693 695
694 rv = qlcnic_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); 696 rv = qlcnic_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1);
695 if (rv != 0) 697 if (rv != 0)