mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
bna: remove unused cbfn parameter
removed: bna_rx_ucast_add bna_rx_ucast_del simplified: bna_enet_pause_config bna_rx_mcast_delall bna_rx_mcast_listset bna_rx_mode_set bna_rx_ucast_listset bna_rx_ucast_set Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1a50691a95
commit
1f9883e032
5 changed files with 25 additions and 59 deletions
|
@ -386,30 +386,19 @@ void bna_rx_coalescing_timeo_set(struct bna_rx *rx, int coalescing_timeo);
|
||||||
void bna_rx_dim_reconfig(struct bna *bna, const u32 vector[][BNA_BIAS_T_MAX]);
|
void bna_rx_dim_reconfig(struct bna *bna, const u32 vector[][BNA_BIAS_T_MAX]);
|
||||||
void bna_rx_dim_update(struct bna_ccb *ccb);
|
void bna_rx_dim_update(struct bna_ccb *ccb);
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac,
|
bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac);
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_ucast_add(struct bna_rx *rx, u8* ucmac,
|
bna_rx_ucast_listset(struct bna_rx *rx, int count, u8 *uclist);
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
|
||||||
enum bna_cb_status
|
|
||||||
bna_rx_ucast_del(struct bna_rx *rx, u8 *ucmac,
|
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
|
||||||
enum bna_cb_status
|
|
||||||
bna_rx_ucast_listset(struct bna_rx *rx, int count, u8 *uclist,
|
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_mcast_add(struct bna_rx *rx, u8 *mcmac,
|
bna_rx_mcast_add(struct bna_rx *rx, u8 *mcmac,
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
void (*cbfn)(struct bnad *, struct bna_rx *));
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mcmac,
|
bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mcmac);
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
|
||||||
void
|
void
|
||||||
bna_rx_mcast_delall(struct bna_rx *rx,
|
bna_rx_mcast_delall(struct bna_rx *rx);
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode,
|
bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode,
|
||||||
enum bna_rxmode bitmask,
|
enum bna_rxmode bitmask);
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *));
|
|
||||||
void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id);
|
void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id);
|
||||||
void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id);
|
void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id);
|
||||||
void bna_rx_vlanfilter_enable(struct bna_rx *rx);
|
void bna_rx_vlanfilter_enable(struct bna_rx *rx);
|
||||||
|
@ -429,8 +418,7 @@ void bna_enet_enable(struct bna_enet *enet);
|
||||||
void bna_enet_disable(struct bna_enet *enet, enum bna_cleanup_type type,
|
void bna_enet_disable(struct bna_enet *enet, enum bna_cleanup_type type,
|
||||||
void (*cbfn)(void *));
|
void (*cbfn)(void *));
|
||||||
void bna_enet_pause_config(struct bna_enet *enet,
|
void bna_enet_pause_config(struct bna_enet *enet,
|
||||||
struct bna_pause_config *pause_config,
|
struct bna_pause_config *pause_config);
|
||||||
void (*cbfn)(struct bnad *));
|
|
||||||
void bna_enet_mtu_set(struct bna_enet *enet, int mtu,
|
void bna_enet_mtu_set(struct bna_enet *enet, int mtu,
|
||||||
void (*cbfn)(struct bnad *));
|
void (*cbfn)(struct bnad *));
|
||||||
void bna_enet_perm_mac_get(struct bna_enet *enet, u8 *mac);
|
void bna_enet_perm_mac_get(struct bna_enet *enet, u8 *mac);
|
||||||
|
|
|
@ -1308,13 +1308,10 @@ bna_enet_disable(struct bna_enet *enet, enum bna_cleanup_type type,
|
||||||
|
|
||||||
void
|
void
|
||||||
bna_enet_pause_config(struct bna_enet *enet,
|
bna_enet_pause_config(struct bna_enet *enet,
|
||||||
struct bna_pause_config *pause_config,
|
struct bna_pause_config *pause_config)
|
||||||
void (*cbfn)(struct bnad *))
|
|
||||||
{
|
{
|
||||||
enet->pause_config = *pause_config;
|
enet->pause_config = *pause_config;
|
||||||
|
|
||||||
enet->pause_cbfn = cbfn;
|
|
||||||
|
|
||||||
bfa_fsm_send_event(enet, ENET_E_PAUSE_CFG);
|
bfa_fsm_send_event(enet, ENET_E_PAUSE_CFG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -863,8 +863,7 @@ bna_rxf_fail(struct bna_rxf *rxf)
|
||||||
}
|
}
|
||||||
|
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac,
|
bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac)
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *))
|
|
||||||
{
|
{
|
||||||
struct bna_rxf *rxf = &rx->rxf;
|
struct bna_rxf *rxf = &rx->rxf;
|
||||||
|
|
||||||
|
@ -878,7 +877,7 @@ bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac,
|
||||||
|
|
||||||
ether_addr_copy(rxf->ucast_pending_mac->addr, ucmac);
|
ether_addr_copy(rxf->ucast_pending_mac->addr, ucmac);
|
||||||
rxf->ucast_pending_set = 1;
|
rxf->ucast_pending_set = 1;
|
||||||
rxf->cam_fltr_cbfn = cbfn;
|
rxf->cam_fltr_cbfn = NULL;
|
||||||
rxf->cam_fltr_cbarg = rx->bna->bnad;
|
rxf->cam_fltr_cbarg = rx->bna->bnad;
|
||||||
|
|
||||||
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
||||||
|
@ -917,8 +916,7 @@ bna_rx_mcast_add(struct bna_rx *rx, u8 *addr,
|
||||||
}
|
}
|
||||||
|
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_ucast_listset(struct bna_rx *rx, int count, u8 *uclist,
|
bna_rx_ucast_listset(struct bna_rx *rx, int count, u8 *uclist)
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *))
|
|
||||||
{
|
{
|
||||||
struct bna_ucam_mod *ucam_mod = &rx->bna->ucam_mod;
|
struct bna_ucam_mod *ucam_mod = &rx->bna->ucam_mod;
|
||||||
struct bna_rxf *rxf = &rx->rxf;
|
struct bna_rxf *rxf = &rx->rxf;
|
||||||
|
@ -968,8 +966,6 @@ bna_rx_ucast_listset(struct bna_rx *rx, int count, u8 *uclist,
|
||||||
list_add_tail(&mac->qe, &rxf->ucast_pending_add_q);
|
list_add_tail(&mac->qe, &rxf->ucast_pending_add_q);
|
||||||
}
|
}
|
||||||
|
|
||||||
rxf->cam_fltr_cbfn = cbfn;
|
|
||||||
rxf->cam_fltr_cbarg = rx->bna->bnad;
|
|
||||||
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
||||||
|
|
||||||
return BNA_CB_SUCCESS;
|
return BNA_CB_SUCCESS;
|
||||||
|
@ -986,8 +982,7 @@ bna_rx_ucast_listset(struct bna_rx *rx, int count, u8 *uclist,
|
||||||
}
|
}
|
||||||
|
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mclist,
|
bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mclist)
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *))
|
|
||||||
{
|
{
|
||||||
struct bna_mcam_mod *mcam_mod = &rx->bna->mcam_mod;
|
struct bna_mcam_mod *mcam_mod = &rx->bna->mcam_mod;
|
||||||
struct bna_rxf *rxf = &rx->rxf;
|
struct bna_rxf *rxf = &rx->rxf;
|
||||||
|
@ -1040,8 +1035,6 @@ bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mclist,
|
||||||
list_add_tail(&mac->qe, &rxf->mcast_pending_add_q);
|
list_add_tail(&mac->qe, &rxf->mcast_pending_add_q);
|
||||||
}
|
}
|
||||||
|
|
||||||
rxf->cam_fltr_cbfn = cbfn;
|
|
||||||
rxf->cam_fltr_cbarg = rx->bna->bnad;
|
|
||||||
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
||||||
|
|
||||||
return BNA_CB_SUCCESS;
|
return BNA_CB_SUCCESS;
|
||||||
|
@ -1058,8 +1051,7 @@ bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mclist,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
bna_rx_mcast_delall(struct bna_rx *rx,
|
bna_rx_mcast_delall(struct bna_rx *rx)
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *))
|
|
||||||
{
|
{
|
||||||
struct bna_rxf *rxf = &rx->rxf;
|
struct bna_rxf *rxf = &rx->rxf;
|
||||||
struct list_head *qe;
|
struct list_head *qe;
|
||||||
|
@ -1089,15 +1081,8 @@ bna_rx_mcast_delall(struct bna_rx *rx,
|
||||||
need_hw_config = 1;
|
need_hw_config = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (need_hw_config) {
|
if (need_hw_config)
|
||||||
rxf->cam_fltr_cbfn = cbfn;
|
|
||||||
rxf->cam_fltr_cbarg = rx->bna->bnad;
|
|
||||||
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cbfn)
|
|
||||||
(*cbfn)(rx->bna->bnad, rx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2843,8 +2828,7 @@ bna_rx_vlan_strip_disable(struct bna_rx *rx)
|
||||||
|
|
||||||
enum bna_cb_status
|
enum bna_cb_status
|
||||||
bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode new_mode,
|
bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode new_mode,
|
||||||
enum bna_rxmode bitmask,
|
enum bna_rxmode bitmask)
|
||||||
void (*cbfn)(struct bnad *, struct bna_rx *))
|
|
||||||
{
|
{
|
||||||
struct bna_rxf *rxf = &rx->rxf;
|
struct bna_rxf *rxf = &rx->rxf;
|
||||||
int need_hw_config = 0;
|
int need_hw_config = 0;
|
||||||
|
@ -2899,11 +2883,10 @@ bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode new_mode,
|
||||||
/* Trigger h/w if needed */
|
/* Trigger h/w if needed */
|
||||||
|
|
||||||
if (need_hw_config) {
|
if (need_hw_config) {
|
||||||
rxf->cam_fltr_cbfn = cbfn;
|
rxf->cam_fltr_cbfn = NULL;
|
||||||
rxf->cam_fltr_cbarg = rx->bna->bnad;
|
rxf->cam_fltr_cbarg = rx->bna->bnad;
|
||||||
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
bfa_fsm_send_event(rxf, RXF_E_CONFIG);
|
||||||
} else if (cbfn)
|
}
|
||||||
(*cbfn)(rx->bna->bnad, rx);
|
|
||||||
|
|
||||||
return BNA_CB_SUCCESS;
|
return BNA_CB_SUCCESS;
|
||||||
|
|
||||||
|
|
|
@ -2349,7 +2349,7 @@ bnad_mac_addr_set_locked(struct bnad *bnad, u8 *mac_addr)
|
||||||
if (!bnad->rx_info[0].rx)
|
if (!bnad->rx_info[0].rx)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = bna_rx_ucast_set(bnad->rx_info[0].rx, mac_addr, NULL);
|
ret = bna_rx_ucast_set(bnad->rx_info[0].rx, mac_addr);
|
||||||
if (ret != BNA_CB_SUCCESS)
|
if (ret != BNA_CB_SUCCESS)
|
||||||
return -EADDRNOTAVAIL;
|
return -EADDRNOTAVAIL;
|
||||||
|
|
||||||
|
@ -2754,7 +2754,7 @@ bnad_open(struct net_device *netdev)
|
||||||
spin_lock_irqsave(&bnad->bna_lock, flags);
|
spin_lock_irqsave(&bnad->bna_lock, flags);
|
||||||
bna_enet_mtu_set(&bnad->bna.enet,
|
bna_enet_mtu_set(&bnad->bna.enet,
|
||||||
BNAD_FRAME_SIZE(bnad->netdev->mtu), NULL);
|
BNAD_FRAME_SIZE(bnad->netdev->mtu), NULL);
|
||||||
bna_enet_pause_config(&bnad->bna.enet, &pause_config, NULL);
|
bna_enet_pause_config(&bnad->bna.enet, &pause_config);
|
||||||
bna_enet_enable(&bnad->bna.enet);
|
bna_enet_enable(&bnad->bna.enet);
|
||||||
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
||||||
|
|
||||||
|
@ -3128,7 +3128,7 @@ bnad_set_rx_ucast_fltr(struct bnad *bnad)
|
||||||
int entry;
|
int entry;
|
||||||
|
|
||||||
if (netdev_uc_empty(bnad->netdev)) {
|
if (netdev_uc_empty(bnad->netdev)) {
|
||||||
bna_rx_ucast_listset(bnad->rx_info[0].rx, 0, NULL, NULL);
|
bna_rx_ucast_listset(bnad->rx_info[0].rx, 0, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3145,8 +3145,7 @@ bnad_set_rx_ucast_fltr(struct bnad *bnad)
|
||||||
entry++;
|
entry++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = bna_rx_ucast_listset(bnad->rx_info[0].rx, entry,
|
ret = bna_rx_ucast_listset(bnad->rx_info[0].rx, entry, mac_list);
|
||||||
mac_list, NULL);
|
|
||||||
kfree(mac_list);
|
kfree(mac_list);
|
||||||
|
|
||||||
if (ret != BNA_CB_SUCCESS)
|
if (ret != BNA_CB_SUCCESS)
|
||||||
|
@ -3157,7 +3156,7 @@ bnad_set_rx_ucast_fltr(struct bnad *bnad)
|
||||||
/* ucast packets not in UCAM are routed to default function */
|
/* ucast packets not in UCAM are routed to default function */
|
||||||
mode_default:
|
mode_default:
|
||||||
bnad->cfg_flags |= BNAD_CF_DEFAULT;
|
bnad->cfg_flags |= BNAD_CF_DEFAULT;
|
||||||
bna_rx_ucast_listset(bnad->rx_info[0].rx, 0, NULL, NULL);
|
bna_rx_ucast_listset(bnad->rx_info[0].rx, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -3186,8 +3185,7 @@ bnad_set_rx_mcast_fltr(struct bnad *bnad)
|
||||||
|
|
||||||
/* copy rest of the MCAST addresses */
|
/* copy rest of the MCAST addresses */
|
||||||
bnad_netdev_mc_list_get(netdev, mac_list);
|
bnad_netdev_mc_list_get(netdev, mac_list);
|
||||||
ret = bna_rx_mcast_listset(bnad->rx_info[0].rx, mc_count + 1,
|
ret = bna_rx_mcast_listset(bnad->rx_info[0].rx, mc_count + 1, mac_list);
|
||||||
mac_list, NULL);
|
|
||||||
kfree(mac_list);
|
kfree(mac_list);
|
||||||
|
|
||||||
if (ret != BNA_CB_SUCCESS)
|
if (ret != BNA_CB_SUCCESS)
|
||||||
|
@ -3197,7 +3195,7 @@ bnad_set_rx_mcast_fltr(struct bnad *bnad)
|
||||||
|
|
||||||
mode_allmulti:
|
mode_allmulti:
|
||||||
bnad->cfg_flags |= BNAD_CF_ALLMULTI;
|
bnad->cfg_flags |= BNAD_CF_ALLMULTI;
|
||||||
bna_rx_mcast_delall(bnad->rx_info[0].rx, NULL);
|
bna_rx_mcast_delall(bnad->rx_info[0].rx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3236,7 +3234,7 @@ bnad_set_rx_mode(struct net_device *netdev)
|
||||||
|
|
||||||
mode_mask = BNA_RXMODE_PROMISC | BNA_RXMODE_DEFAULT |
|
mode_mask = BNA_RXMODE_PROMISC | BNA_RXMODE_DEFAULT |
|
||||||
BNA_RXMODE_ALLMULTI;
|
BNA_RXMODE_ALLMULTI;
|
||||||
bna_rx_mode_set(bnad->rx_info[0].rx, new_mode, mode_mask, NULL);
|
bna_rx_mode_set(bnad->rx_info[0].rx, new_mode, mode_mask);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -533,7 +533,7 @@ bnad_set_pauseparam(struct net_device *netdev,
|
||||||
pause_config.rx_pause = pauseparam->rx_pause;
|
pause_config.rx_pause = pauseparam->rx_pause;
|
||||||
pause_config.tx_pause = pauseparam->tx_pause;
|
pause_config.tx_pause = pauseparam->tx_pause;
|
||||||
spin_lock_irqsave(&bnad->bna_lock, flags);
|
spin_lock_irqsave(&bnad->bna_lock, flags);
|
||||||
bna_enet_pause_config(&bnad->bna.enet, &pause_config, NULL);
|
bna_enet_pause_config(&bnad->bna.enet, &pause_config);
|
||||||
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
spin_unlock_irqrestore(&bnad->bna_lock, flags);
|
||||||
}
|
}
|
||||||
mutex_unlock(&bnad->conf_mutex);
|
mutex_unlock(&bnad->conf_mutex);
|
||||||
|
|
Loading…
Reference in a new issue