aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bna
diff options
context:
space:
mode:
authorRasesh Mody <rmody@brocade.com>2010-12-23 16:45:04 -0500
committerDavid S. Miller <davem@davemloft.net>2010-12-25 22:16:00 -0500
commit886f7fedb0cee56acca7620d89186669273d3d56 (patch)
treea8a518215652ecc9002a712817082ed642674cdd /drivers/net/bna
parent815f41e74031d6dc6d6dd988f58c03a1d72d02b9 (diff)
bna: Enable pure priority tagged packet reception and rxf uninit cleanup fix
Change Details: - Enable reception of pure priority tagged packets by default by turning on VLAN Id = 0 - Clear the promiscuous mode, all multicast mode flags when bna_rxf_uninit is called 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')
-rw-r--r--drivers/net/bna/bna_txrx.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/bna/bna_txrx.c b/drivers/net/bna/bna_txrx.c
index fb6cf1f19c99..50766181d585 100644
--- a/drivers/net/bna/bna_txrx.c
+++ b/drivers/net/bna/bna_txrx.c
@@ -1441,12 +1441,16 @@ bna_rxf_init(struct bna_rxf *rxf,
1441 memset(rxf->vlan_filter_table, 0, 1441 memset(rxf->vlan_filter_table, 0,
1442 (sizeof(u32) * ((BFI_MAX_VLAN + 1) / 32))); 1442 (sizeof(u32) * ((BFI_MAX_VLAN + 1) / 32)));
1443 1443
1444 /* Set up VLAN 0 for pure priority tagged packets */
1445 rxf->vlan_filter_table[0] |= 1;
1446
1444 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); 1447 bfa_fsm_set_state(rxf, bna_rxf_sm_stopped);
1445} 1448}
1446 1449
1447static void 1450static void
1448bna_rxf_uninit(struct bna_rxf *rxf) 1451bna_rxf_uninit(struct bna_rxf *rxf)
1449{ 1452{
1453 struct bna *bna = rxf->rx->bna;
1450 struct bna_mac *mac; 1454 struct bna_mac *mac;
1451 1455
1452 bna_rit_mod_seg_put(&rxf->rx->bna->rit_mod, rxf->rit_segment); 1456 bna_rit_mod_seg_put(&rxf->rx->bna->rit_mod, rxf->rit_segment);
@@ -1473,6 +1477,27 @@ bna_rxf_uninit(struct bna_rxf *rxf)
1473 bna_mcam_mod_mac_put(&rxf->rx->bna->mcam_mod, mac); 1477 bna_mcam_mod_mac_put(&rxf->rx->bna->mcam_mod, mac);
1474 } 1478 }
1475 1479
1480 /* Turn off pending promisc mode */
1481 if (is_promisc_enable(rxf->rxmode_pending,
1482 rxf->rxmode_pending_bitmask)) {
1483 /* system promisc state should be pending */
1484 BUG_ON(!(bna->rxf_promisc_id == rxf->rxf_id));
1485 promisc_inactive(rxf->rxmode_pending,
1486 rxf->rxmode_pending_bitmask);
1487 bna->rxf_promisc_id = BFI_MAX_RXF;
1488 }
1489 /* Promisc mode should not be active */
1490 BUG_ON(rxf->rxmode_active & BNA_RXMODE_PROMISC);
1491
1492 /* Turn off pending all-multi mode */
1493 if (is_allmulti_enable(rxf->rxmode_pending,
1494 rxf->rxmode_pending_bitmask)) {
1495 allmulti_inactive(rxf->rxmode_pending,
1496 rxf->rxmode_pending_bitmask);
1497 }
1498 /* Allmulti mode should not be active */
1499 BUG_ON(rxf->rxmode_active & BNA_RXMODE_ALLMULTI);
1500
1476 rxf->rx = NULL; 1501 rxf->rx = NULL;
1477} 1502}
1478 1503