mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 19:23:57 +08:00
qeth use common function qeth_get_setassparms_cmd
There have been 2 identical versions of function qeth_get_setassparms_cmd() for layer 2 and layer 3. Remove the layer 3 function qeth_l3_get_setassparms_cmd() and call the common one named qeth_get_setassparms_cmd() located in qeth_core_main.c Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e043046a5a
commit
b475e3161c
@ -981,6 +981,10 @@ int qeth_send_setassparms(struct qeth_card *, struct qeth_cmd_buffer *, __u16,
|
|||||||
int (*reply_cb)(struct qeth_card *,
|
int (*reply_cb)(struct qeth_card *,
|
||||||
struct qeth_reply *, unsigned long),
|
struct qeth_reply *, unsigned long),
|
||||||
void *);
|
void *);
|
||||||
|
struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *,
|
||||||
|
enum qeth_ipa_funcs,
|
||||||
|
__u16, __u16,
|
||||||
|
enum qeth_prot_versions);
|
||||||
int qeth_start_ipa_tx_checksum(struct qeth_card *);
|
int qeth_start_ipa_tx_checksum(struct qeth_card *);
|
||||||
int qeth_set_rx_csum(struct qeth_card *, int);
|
int qeth_set_rx_csum(struct qeth_card *, int);
|
||||||
|
|
||||||
|
@ -5297,7 +5297,7 @@ static int qeth_setassparms_cb(struct qeth_card *card,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card,
|
struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card,
|
||||||
enum qeth_ipa_funcs ipa_func,
|
enum qeth_ipa_funcs ipa_func,
|
||||||
__u16 cmd_code, __u16 len,
|
__u16 cmd_code, __u16 len,
|
||||||
enum qeth_prot_versions prot)
|
enum qeth_prot_versions prot)
|
||||||
@ -5319,6 +5319,7 @@ static struct qeth_cmd_buffer *qeth_get_setassparms_cmd(struct qeth_card *card,
|
|||||||
|
|
||||||
return iob;
|
return iob;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(qeth_get_setassparms_cmd);
|
||||||
|
|
||||||
int qeth_send_setassparms(struct qeth_card *card,
|
int qeth_send_setassparms(struct qeth_card *card,
|
||||||
struct qeth_cmd_buffer *iob, __u16 len, long data,
|
struct qeth_cmd_buffer *iob, __u16 len, long data,
|
||||||
|
@ -1043,28 +1043,6 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct qeth_cmd_buffer *qeth_l3_get_setassparms_cmd(
|
|
||||||
struct qeth_card *card, enum qeth_ipa_funcs ipa_func, __u16 cmd_code,
|
|
||||||
__u16 len, enum qeth_prot_versions prot)
|
|
||||||
{
|
|
||||||
struct qeth_cmd_buffer *iob;
|
|
||||||
struct qeth_ipa_cmd *cmd;
|
|
||||||
|
|
||||||
QETH_CARD_TEXT(card, 4, "getasscm");
|
|
||||||
iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot);
|
|
||||||
|
|
||||||
if (iob) {
|
|
||||||
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
||||||
cmd->data.setassparms.hdr.assist_no = ipa_func;
|
|
||||||
cmd->data.setassparms.hdr.length = 8 + len;
|
|
||||||
cmd->data.setassparms.hdr.command_code = cmd_code;
|
|
||||||
cmd->data.setassparms.hdr.return_code = 0;
|
|
||||||
cmd->data.setassparms.hdr.seq_no = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return iob;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_QETH_IPV6
|
#ifdef CONFIG_QETH_IPV6
|
||||||
static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
|
static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
|
||||||
enum qeth_ipa_funcs ipa_func, __u16 cmd_code)
|
enum qeth_ipa_funcs ipa_func, __u16 cmd_code)
|
||||||
@ -1073,7 +1051,7 @@ static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card,
|
|||||||
struct qeth_cmd_buffer *iob;
|
struct qeth_cmd_buffer *iob;
|
||||||
|
|
||||||
QETH_CARD_TEXT(card, 4, "simassp6");
|
QETH_CARD_TEXT(card, 4, "simassp6");
|
||||||
iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code,
|
iob = qeth_get_setassparms_cmd(card, ipa_func, cmd_code,
|
||||||
0, QETH_PROT_IPV6);
|
0, QETH_PROT_IPV6);
|
||||||
if (!iob)
|
if (!iob)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@ -2344,9 +2322,10 @@ static int qeth_l3_query_arp_cache_info(struct qeth_card *card,
|
|||||||
|
|
||||||
QETH_CARD_TEXT_(card, 3, "qarpipv%i", prot);
|
QETH_CARD_TEXT_(card, 3, "qarpipv%i", prot);
|
||||||
|
|
||||||
iob = qeth_l3_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
|
iob = qeth_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
|
||||||
IPA_CMD_ASS_ARP_QUERY_INFO,
|
IPA_CMD_ASS_ARP_QUERY_INFO,
|
||||||
sizeof(struct qeth_arp_query_data) - sizeof(char),
|
sizeof(struct qeth_arp_query_data)
|
||||||
|
- sizeof(char),
|
||||||
prot);
|
prot);
|
||||||
if (!iob)
|
if (!iob)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@ -2439,7 +2418,7 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card,
|
|||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
iob = qeth_l3_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
|
iob = qeth_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
|
||||||
IPA_CMD_ASS_ARP_ADD_ENTRY,
|
IPA_CMD_ASS_ARP_ADD_ENTRY,
|
||||||
sizeof(struct qeth_arp_cache_entry),
|
sizeof(struct qeth_arp_cache_entry),
|
||||||
QETH_PROT_IPV4);
|
QETH_PROT_IPV4);
|
||||||
@ -2480,7 +2459,7 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card,
|
|||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
memcpy(buf, entry, 12);
|
memcpy(buf, entry, 12);
|
||||||
iob = qeth_l3_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
|
iob = qeth_get_setassparms_cmd(card, IPA_ARP_PROCESSING,
|
||||||
IPA_CMD_ASS_ARP_REMOVE_ENTRY,
|
IPA_CMD_ASS_ARP_REMOVE_ENTRY,
|
||||||
12,
|
12,
|
||||||
QETH_PROT_IPV4);
|
QETH_PROT_IPV4);
|
||||||
|
Loading…
Reference in New Issue
Block a user