Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/qlnx/qlnxe/qlnx_os.c
| Show First 20 Lines • Show All 7,051 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static int | static int | ||||
| qlnx_set_rx_mode(qlnx_host_t *ha) | qlnx_set_rx_mode(qlnx_host_t *ha) | ||||
| { | { | ||||
| int rc = 0; | int rc = 0; | ||||
| uint8_t filter; | uint8_t filter; | ||||
| const if_t ifp = ha->ifp; | const if_t ifp = ha->ifp; | ||||
| const struct ifaddr *ifa; | |||||
| struct sockaddr_dl *sdl; | |||||
| ifa = if_getifaddr(ifp); | rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, if_getlladdr(ifp)); | ||||
| if (if_gettype(ifp) == IFT_ETHER && ifa != NULL && | |||||
| ifa->ifa_addr != NULL) { | |||||
| sdl = (struct sockaddr_dl *) ifa->ifa_addr; | |||||
| rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, LLADDR(sdl)); | |||||
| } else { | |||||
| rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac); | |||||
| } | |||||
| if (rc) | if (rc) | ||||
| return rc; | return rc; | ||||
| rc = qlnx_remove_all_mcast_mac(ha); | rc = qlnx_remove_all_mcast_mac(ha); | ||||
| if (rc) | if (rc) | ||||
| return rc; | return rc; | ||||
| filter = ECORE_ACCEPT_UCAST_MATCHED | | filter = ECORE_ACCEPT_UCAST_MATCHED | | ||||
| ECORE_ACCEPT_MCAST_MATCHED | | ECORE_ACCEPT_MCAST_MATCHED | | ||||
| ECORE_ACCEPT_BCAST; | ECORE_ACCEPT_BCAST; | ||||
| ▲ Show 20 Lines • Show All 1,276 Lines • Show Last 20 Lines | |||||