Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/liquidio/lio_ioctl.c
| Show First 20 Lines • Show All 437 Lines • ▼ Show 20 Lines | lio_set_mac(if_t ifp, uint8_t *p) | ||||
| nctrl.ncmd.s.more = 1; | nctrl.ncmd.s.more = 1; | ||||
| nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; | nctrl.iq_no = lio->linfo.txpciq[0].s.q_no; | ||||
| nctrl.lio = lio; | nctrl.lio = lio; | ||||
| nctrl.cb_fn = lio_ctrl_cmd_completion; | nctrl.cb_fn = lio_ctrl_cmd_completion; | ||||
| nctrl.wait_time = 100; | nctrl.wait_time = 100; | ||||
| nctrl.udd[0] = 0; | nctrl.udd[0] = 0; | ||||
| /* The MAC Address is presented in network byte order. */ | /* The MAC Address is presented in network byte order. */ | ||||
| memcpy((uint8_t *)&nctrl.udd[0] + 2, p, ETHER_HDR_LEN); | memcpy((uint8_t *)&nctrl.udd[0] + 2, p, ETHER_ADDR_LEN); | ||||
| ret = lio_send_ctrl_pkt(lio->oct_dev, &nctrl); | ret = lio_send_ctrl_pkt(lio->oct_dev, &nctrl); | ||||
| if (ret < 0) { | if (ret < 0) { | ||||
| lio_dev_err(oct, "MAC Address change failed\n"); | lio_dev_err(oct, "MAC Address change failed\n"); | ||||
| return (ENOMEM); | return (ENOMEM); | ||||
| } | } | ||||
| memcpy(((uint8_t *)&lio->linfo.hw_addr) + 2, p, ETHER_HDR_LEN); | memcpy(((uint8_t *)&lio->linfo.hw_addr) + 2, p, ETHER_ADDR_LEN); | ||||
| return (0); | return (0); | ||||
| } | } | ||||
| /* | /* | ||||
| * \brief Converts a mask based on ifp flags | * \brief Converts a mask based on ifp flags | ||||
| * @param ifp network device | * @param ifp network device | ||||
| * | * | ||||
| ▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines | |||||