Missing fix in lem code to limit WOL to MAGIC,

and made code backward compatible to 7.3 with
conditionals around the buf_ring_free call.
This commit is contained in:
Jack F Vogel 2010-05-14 22:20:58 +00:00
parent a00383a2d6
commit 70defa90ed
3 changed files with 6 additions and 2 deletions

View File

@ -2951,7 +2951,9 @@ err_tx_desc:
em_dma_free(adapter, &txr->txdma);
free(adapter->rx_rings, M_DEVBUF);
rx_fail:
#if __FreeBSD_version >= 800000
buf_ring_free(txr->br, M_DEVBUF);
#endif
free(adapter->tx_rings, M_DEVBUF);
fail:
return (error);

View File

@ -2969,7 +2969,9 @@ err_tx_desc:
igb_dma_free(adapter, &txr->txdma);
free(adapter->rx_rings, M_DEVBUF);
rx_fail:
#if __FreeBSD_version >= 800000
buf_ring_free(txr->br, M_DEVBUF);
#endif
free(adapter->tx_rings, M_DEVBUF);
tx_fail:
free(adapter->queues, M_DEVBUF);

View File

@ -2422,10 +2422,10 @@ lem_setup_interface(device_t dev, struct adapter *adapter)
ifp->if_capabilities |= IFCAP_POLLING;
#endif
/* Enable All WOL methods by default */
/* Enable only WOL MAGIC by default */
if (adapter->wol) {
ifp->if_capabilities |= IFCAP_WOL;
ifp->if_capenable |= IFCAP_WOL;
ifp->if_capenable |= IFCAP_WOL_MAGIC;
}
/*