diff options
author | Rasesh Mody <rmody@brocade.com> | 2010-10-05 11:46:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-05 23:39:39 -0400 |
commit | b7ee31c5af7f04b67d8b8e4f3b2bcb8bcfced8a3 (patch) | |
tree | a50e868a3a0d6dcc9c86ca488db91f77eaa3ab56 /drivers/net/bna/bna.h | |
parent | e2fa6f2ef6e48666b78d4b0f00914b06bb19d298 (diff) |
bna: scope and dead code cleanup
As suggested by Stephen Hemminger:
1) Made functions and data structures static wherever possible.
2) Removed unused code.
Signed-off-by: Debashis Dutt <ddutt@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bna/bna.h')
-rw-r--r-- | drivers/net/bna/bna.h | 108 |
1 files changed, 2 insertions, 106 deletions
diff --git a/drivers/net/bna/bna.h b/drivers/net/bna/bna.h index 6a2b3291c190..df6676bbc84e 100644 --- a/drivers/net/bna/bna.h +++ b/drivers/net/bna/bna.h | |||
@@ -19,8 +19,7 @@ | |||
19 | #include "bfi_ll.h" | 19 | #include "bfi_ll.h" |
20 | #include "bna_types.h" | 20 | #include "bna_types.h" |
21 | 21 | ||
22 | extern u32 bna_dim_vector[][BNA_BIAS_T_MAX]; | 22 | extern const u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX]; |
23 | extern u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX]; | ||
24 | 23 | ||
25 | /** | 24 | /** |
26 | * | 25 | * |
@@ -344,9 +343,6 @@ do { \ | |||
344 | * BNA | 343 | * BNA |
345 | */ | 344 | */ |
346 | 345 | ||
347 | /* Internal APIs */ | ||
348 | void bna_adv_res_req(struct bna_res_info *res_info); | ||
349 | |||
350 | /* APIs for BNAD */ | 346 | /* APIs for BNAD */ |
351 | void bna_res_req(struct bna_res_info *res_info); | 347 | void bna_res_req(struct bna_res_info *res_info); |
352 | void bna_init(struct bna *bna, struct bnad *bnad, | 348 | void bna_init(struct bna *bna, struct bnad *bnad, |
@@ -354,7 +350,6 @@ void bna_init(struct bna *bna, struct bnad *bnad, | |||
354 | struct bna_res_info *res_info); | 350 | struct bna_res_info *res_info); |
355 | void bna_uninit(struct bna *bna); | 351 | void bna_uninit(struct bna *bna); |
356 | void bna_stats_get(struct bna *bna); | 352 | void bna_stats_get(struct bna *bna); |
357 | void bna_stats_clr(struct bna *bna); | ||
358 | void bna_get_perm_mac(struct bna *bna, u8 *mac); | 353 | void bna_get_perm_mac(struct bna *bna, u8 *mac); |
359 | 354 | ||
360 | /* APIs for Rx */ | 355 | /* APIs for Rx */ |
@@ -376,18 +371,6 @@ void bna_rit_mod_seg_put(struct bna_rit_mod *rit_mod, | |||
376 | * DEVICE | 371 | * DEVICE |
377 | */ | 372 | */ |
378 | 373 | ||
379 | /* Interanl APIs */ | ||
380 | void bna_adv_device_init(struct bna_device *device, struct bna *bna, | ||
381 | struct bna_res_info *res_info); | ||
382 | |||
383 | /* APIs for BNA */ | ||
384 | void bna_device_init(struct bna_device *device, struct bna *bna, | ||
385 | struct bna_res_info *res_info); | ||
386 | void bna_device_uninit(struct bna_device *device); | ||
387 | void bna_device_cb_port_stopped(void *arg, enum bna_cb_status status); | ||
388 | int bna_device_status_get(struct bna_device *device); | ||
389 | int bna_device_state_get(struct bna_device *device); | ||
390 | |||
391 | /* APIs for BNAD */ | 374 | /* APIs for BNAD */ |
392 | void bna_device_enable(struct bna_device *device); | 375 | void bna_device_enable(struct bna_device *device); |
393 | void bna_device_disable(struct bna_device *device, | 376 | void bna_device_disable(struct bna_device *device, |
@@ -397,12 +380,6 @@ void bna_device_disable(struct bna_device *device, | |||
397 | * MBOX | 380 | * MBOX |
398 | */ | 381 | */ |
399 | 382 | ||
400 | /* APIs for DEVICE */ | ||
401 | void bna_mbox_mod_init(struct bna_mbox_mod *mbox_mod, struct bna *bna); | ||
402 | void bna_mbox_mod_uninit(struct bna_mbox_mod *mbox_mod); | ||
403 | void bna_mbox_mod_start(struct bna_mbox_mod *mbox_mod); | ||
404 | void bna_mbox_mod_stop(struct bna_mbox_mod *mbox_mod); | ||
405 | |||
406 | /* APIs for PORT, TX, RX */ | 383 | /* APIs for PORT, TX, RX */ |
407 | void bna_mbox_handler(struct bna *bna, u32 intr_status); | 384 | void bna_mbox_handler(struct bna *bna, u32 intr_status); |
408 | void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe); | 385 | void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe); |
@@ -411,17 +388,6 @@ void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe); | |||
411 | * PORT | 388 | * PORT |
412 | */ | 389 | */ |
413 | 390 | ||
414 | /* APIs for BNA */ | ||
415 | void bna_port_init(struct bna_port *port, struct bna *bna); | ||
416 | void bna_port_uninit(struct bna_port *port); | ||
417 | int bna_port_state_get(struct bna_port *port); | ||
418 | int bna_llport_state_get(struct bna_llport *llport); | ||
419 | |||
420 | /* APIs for DEVICE */ | ||
421 | void bna_port_start(struct bna_port *port); | ||
422 | void bna_port_stop(struct bna_port *port); | ||
423 | void bna_port_fail(struct bna_port *port); | ||
424 | |||
425 | /* API for RX */ | 391 | /* API for RX */ |
426 | int bna_port_mtu_get(struct bna_port *port); | 392 | int bna_port_mtu_get(struct bna_port *port); |
427 | void bna_llport_admin_up(struct bna_llport *llport); | 393 | void bna_llport_admin_up(struct bna_llport *llport); |
@@ -437,12 +403,6 @@ void bna_port_pause_config(struct bna_port *port, | |||
437 | void bna_port_mtu_set(struct bna_port *port, int mtu, | 403 | void bna_port_mtu_set(struct bna_port *port, int mtu, |
438 | void (*cbfn)(struct bnad *, enum bna_cb_status)); | 404 | void (*cbfn)(struct bnad *, enum bna_cb_status)); |
439 | void bna_port_mac_get(struct bna_port *port, mac_t *mac); | 405 | void bna_port_mac_get(struct bna_port *port, mac_t *mac); |
440 | void bna_port_type_set(struct bna_port *port, enum bna_port_type type); | ||
441 | void bna_port_linkcbfn_set(struct bna_port *port, | ||
442 | void (*linkcbfn)(struct bnad *, | ||
443 | enum bna_link_status)); | ||
444 | void bna_port_admin_up(struct bna_port *port); | ||
445 | void bna_port_admin_down(struct bna_port *port); | ||
446 | 406 | ||
447 | /* Callbacks for TX, RX */ | 407 | /* Callbacks for TX, RX */ |
448 | void bna_port_cb_tx_stopped(struct bna_port *port, | 408 | void bna_port_cb_tx_stopped(struct bna_port *port, |
@@ -450,11 +410,6 @@ void bna_port_cb_tx_stopped(struct bna_port *port, | |||
450 | void bna_port_cb_rx_stopped(struct bna_port *port, | 410 | void bna_port_cb_rx_stopped(struct bna_port *port, |
451 | enum bna_cb_status status); | 411 | enum bna_cb_status status); |
452 | 412 | ||
453 | /* Callbacks for MBOX */ | ||
454 | void bna_port_cb_link_up(struct bna_port *port, struct bfi_ll_aen *aen, | ||
455 | int status); | ||
456 | void bna_port_cb_link_down(struct bna_port *port, int status); | ||
457 | |||
458 | /** | 413 | /** |
459 | * IB | 414 | * IB |
460 | */ | 415 | */ |
@@ -464,25 +419,10 @@ void bna_ib_mod_init(struct bna_ib_mod *ib_mod, struct bna *bna, | |||
464 | struct bna_res_info *res_info); | 419 | struct bna_res_info *res_info); |
465 | void bna_ib_mod_uninit(struct bna_ib_mod *ib_mod); | 420 | void bna_ib_mod_uninit(struct bna_ib_mod *ib_mod); |
466 | 421 | ||
467 | /* APIs for TX, RX */ | ||
468 | struct bna_ib *bna_ib_get(struct bna_ib_mod *ib_mod, | ||
469 | enum bna_intr_type intr_type, int vector); | ||
470 | void bna_ib_put(struct bna_ib_mod *ib_mod, struct bna_ib *ib); | ||
471 | int bna_ib_reserve_idx(struct bna_ib *ib); | ||
472 | void bna_ib_release_idx(struct bna_ib *ib, int idx); | ||
473 | int bna_ib_config(struct bna_ib *ib, struct bna_ib_config *ib_config); | ||
474 | void bna_ib_start(struct bna_ib *ib); | ||
475 | void bna_ib_stop(struct bna_ib *ib); | ||
476 | void bna_ib_fail(struct bna_ib *ib); | ||
477 | void bna_ib_coalescing_timeo_set(struct bna_ib *ib, u8 coalescing_timeo); | ||
478 | |||
479 | /** | 422 | /** |
480 | * TX MODULE AND TX | 423 | * TX MODULE AND TX |
481 | */ | 424 | */ |
482 | 425 | ||
483 | /* Internal APIs */ | ||
484 | void bna_tx_prio_changed(struct bna_tx *tx, int prio); | ||
485 | |||
486 | /* APIs for BNA */ | 426 | /* APIs for BNA */ |
487 | void bna_tx_mod_init(struct bna_tx_mod *tx_mod, struct bna *bna, | 427 | void bna_tx_mod_init(struct bna_tx_mod *tx_mod, struct bna *bna, |
488 | struct bna_res_info *res_info); | 428 | struct bna_res_info *res_info); |
@@ -508,10 +448,6 @@ void bna_tx_enable(struct bna_tx *tx); | |||
508 | void bna_tx_disable(struct bna_tx *tx, enum bna_cleanup_type type, | 448 | void bna_tx_disable(struct bna_tx *tx, enum bna_cleanup_type type, |
509 | void (*cbfn)(void *, struct bna_tx *, | 449 | void (*cbfn)(void *, struct bna_tx *, |
510 | enum bna_cb_status)); | 450 | enum bna_cb_status)); |
511 | enum bna_cb_status | ||
512 | bna_tx_prio_set(struct bna_tx *tx, int prio, | ||
513 | void (*cbfn)(struct bnad *, struct bna_tx *, | ||
514 | enum bna_cb_status)); | ||
515 | void bna_tx_coalescing_timeo_set(struct bna_tx *tx, int coalescing_timeo); | 451 | void bna_tx_coalescing_timeo_set(struct bna_tx *tx, int coalescing_timeo); |
516 | 452 | ||
517 | /** | 453 | /** |
@@ -564,35 +500,20 @@ void bna_rx_disable(struct bna_rx *rx, enum bna_cleanup_type type, | |||
564 | void (*cbfn)(void *, struct bna_rx *, | 500 | void (*cbfn)(void *, struct bna_rx *, |
565 | enum bna_cb_status)); | 501 | enum bna_cb_status)); |
566 | void bna_rx_coalescing_timeo_set(struct bna_rx *rx, int coalescing_timeo); | 502 | void bna_rx_coalescing_timeo_set(struct bna_rx *rx, int coalescing_timeo); |
567 | void bna_rx_dim_reconfig(struct bna *bna, u32 vector[][BNA_BIAS_T_MAX]); | 503 | void bna_rx_dim_reconfig(struct bna *bna, const u32 vector[][BNA_BIAS_T_MAX]); |
568 | void bna_rx_dim_update(struct bna_ccb *ccb); | 504 | void bna_rx_dim_update(struct bna_ccb *ccb); |
569 | enum bna_cb_status | 505 | enum bna_cb_status |
570 | bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac, | 506 | bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac, |
571 | void (*cbfn)(struct bnad *, struct bna_rx *, | 507 | void (*cbfn)(struct bnad *, struct bna_rx *, |
572 | enum bna_cb_status)); | 508 | enum bna_cb_status)); |
573 | enum bna_cb_status | 509 | enum bna_cb_status |
574 | bna_rx_ucast_add(struct bna_rx *rx, u8* ucmac, | ||
575 | void (*cbfn)(struct bnad *, struct bna_rx *, | ||
576 | enum bna_cb_status)); | ||
577 | enum bna_cb_status | ||
578 | bna_rx_ucast_del(struct bna_rx *rx, u8 *ucmac, | ||
579 | void (*cbfn)(struct bnad *, struct bna_rx *, | ||
580 | enum bna_cb_status)); | ||
581 | enum bna_cb_status | ||
582 | bna_rx_mcast_add(struct bna_rx *rx, u8 *mcmac, | 510 | bna_rx_mcast_add(struct bna_rx *rx, u8 *mcmac, |
583 | void (*cbfn)(struct bnad *, struct bna_rx *, | 511 | void (*cbfn)(struct bnad *, struct bna_rx *, |
584 | enum bna_cb_status)); | 512 | enum bna_cb_status)); |
585 | enum bna_cb_status | 513 | enum bna_cb_status |
586 | bna_rx_mcast_del(struct bna_rx *rx, u8 *mcmac, | ||
587 | void (*cbfn)(struct bnad *, struct bna_rx *, | ||
588 | enum bna_cb_status)); | ||
589 | enum bna_cb_status | ||
590 | bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mcmac, | 514 | bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mcmac, |
591 | void (*cbfn)(struct bnad *, struct bna_rx *, | 515 | void (*cbfn)(struct bnad *, struct bna_rx *, |
592 | enum bna_cb_status)); | 516 | enum bna_cb_status)); |
593 | void bna_rx_mcast_delall(struct bna_rx *rx, | ||
594 | void (*cbfn)(struct bnad *, struct bna_rx *, | ||
595 | enum bna_cb_status)); | ||
596 | enum bna_cb_status | 517 | enum bna_cb_status |
597 | bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode, | 518 | bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode, |
598 | enum bna_rxmode bitmask, | 519 | enum bna_rxmode bitmask, |
@@ -601,36 +522,12 @@ bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode, | |||
601 | void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id); | 522 | void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id); |
602 | void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id); | 523 | void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id); |
603 | void bna_rx_vlanfilter_enable(struct bna_rx *rx); | 524 | void bna_rx_vlanfilter_enable(struct bna_rx *rx); |
604 | void bna_rx_vlanfilter_disable(struct bna_rx *rx); | ||
605 | void bna_rx_rss_enable(struct bna_rx *rx); | ||
606 | void bna_rx_rss_disable(struct bna_rx *rx); | ||
607 | void bna_rx_rss_reconfig(struct bna_rx *rx, struct bna_rxf_rss *rss_config); | ||
608 | void bna_rx_rss_rit_set(struct bna_rx *rx, unsigned int *vectors, | ||
609 | int nvectors); | ||
610 | void bna_rx_hds_enable(struct bna_rx *rx, struct bna_rxf_hds *hds_config, | 525 | void bna_rx_hds_enable(struct bna_rx *rx, struct bna_rxf_hds *hds_config, |
611 | void (*cbfn)(struct bnad *, struct bna_rx *, | 526 | void (*cbfn)(struct bnad *, struct bna_rx *, |
612 | enum bna_cb_status)); | 527 | enum bna_cb_status)); |
613 | void bna_rx_hds_disable(struct bna_rx *rx, | 528 | void bna_rx_hds_disable(struct bna_rx *rx, |
614 | void (*cbfn)(struct bnad *, struct bna_rx *, | 529 | void (*cbfn)(struct bnad *, struct bna_rx *, |
615 | enum bna_cb_status)); | 530 | enum bna_cb_status)); |
616 | void bna_rx_receive_pause(struct bna_rx *rx, | ||
617 | void (*cbfn)(struct bnad *, struct bna_rx *, | ||
618 | enum bna_cb_status)); | ||
619 | void bna_rx_receive_resume(struct bna_rx *rx, | ||
620 | void (*cbfn)(struct bnad *, struct bna_rx *, | ||
621 | enum bna_cb_status)); | ||
622 | |||
623 | /* RxF APIs for RX */ | ||
624 | void bna_rxf_start(struct bna_rxf *rxf); | ||
625 | void bna_rxf_stop(struct bna_rxf *rxf); | ||
626 | void bna_rxf_fail(struct bna_rxf *rxf); | ||
627 | void bna_rxf_init(struct bna_rxf *rxf, struct bna_rx *rx, | ||
628 | struct bna_rx_config *q_config); | ||
629 | void bna_rxf_uninit(struct bna_rxf *rxf); | ||
630 | |||
631 | /* Callback from RXF to RX */ | ||
632 | void bna_rx_cb_rxf_stopped(struct bna_rx *rx, enum bna_cb_status); | ||
633 | void bna_rx_cb_rxf_started(struct bna_rx *rx, enum bna_cb_status); | ||
634 | 531 | ||
635 | /** | 532 | /** |
636 | * BNAD | 533 | * BNAD |
@@ -639,7 +536,6 @@ void bna_rx_cb_rxf_started(struct bna_rx *rx, enum bna_cb_status); | |||
639 | /* Callbacks for BNA */ | 536 | /* Callbacks for BNA */ |
640 | void bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status, | 537 | void bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status, |
641 | struct bna_stats *stats); | 538 | struct bna_stats *stats); |
642 | void bnad_cb_stats_clr(struct bnad *bnad); | ||
643 | 539 | ||
644 | /* Callbacks for DEVICE */ | 540 | /* Callbacks for DEVICE */ |
645 | void bnad_cb_device_enabled(struct bnad *bnad, enum bna_cb_status status); | 541 | void bnad_cb_device_enabled(struct bnad *bnad, enum bna_cb_status status); |