diff options
author | Sathya Perla <sathya.perla@emulex.com> | 2011-08-02 21:57:42 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-03 12:23:29 +0200 |
commit | ea172a011d1435d9bd167265bf51cc64d026b4e7 (patch) | |
tree | 66b4988065a7f51973a9705a4321beed701c6374 /drivers/net/benet/be_cmds.c | |
parent | be2net: remove wrong and unnecessary calls to netif_carrier_off() (diff) | |
download | linux-ea172a011d1435d9bd167265bf51cc64d026b4e7.tar.xz linux-ea172a011d1435d9bd167265bf51cc64d026b4e7.zip |
be2net: no need to query link status
Change in the link status generates an MCC event. This is processed and
netif_carrier_on/off is called accordingly. Don't need to query/store the
link_status state.
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet/be_cmds.c')
-rw-r--r-- | drivers/net/benet/be_cmds.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 7dc47410443d..1c25dbdb1c9d 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -110,8 +110,7 @@ done: static void be_async_link_state_process(struct be_adapter *adapter, struct be_async_event_link_state *evt) { - be_link_status_update(adapter, - evt->port_link_status == ASYNC_EVENT_LINK_UP); + be_link_status_update(adapter, evt->port_link_status); } /* Grp5 CoS Priority evt */ @@ -1261,8 +1260,8 @@ err: } /* Uses synchronous mcc */ -int be_cmd_link_status_query(struct be_adapter *adapter, - bool *link_up, u8 *mac_speed, u16 *link_speed, u32 dom) +int be_cmd_link_status_query(struct be_adapter *adapter, u8 *mac_speed, + u16 *link_speed, u32 dom) { struct be_mcc_wrb *wrb; struct be_cmd_req_link_status *req; @@ -1277,8 +1276,6 @@ int be_cmd_link_status_query(struct be_adapter *adapter, } req = embedded_payload(wrb); - *link_up = false; - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0, OPCODE_COMMON_NTWK_LINK_STATUS_QUERY); @@ -1289,7 +1286,6 @@ int be_cmd_link_status_query(struct be_adapter *adapter, if (!status) { struct be_cmd_resp_link_status *resp = embedded_payload(wrb); if (resp->mac_speed != PHY_LINK_SPEED_ZERO) { - *link_up = true; *link_speed = le16_to_cpu(resp->link_speed); *mac_speed = resp->mac_speed; } |