Lines Matching full:ifp

80 void brcmf_c_set_joinpref_default(struct brcmf_if *ifp)  in brcmf_c_set_joinpref_default()  argument
82 struct brcmf_pub *drvr = ifp->drvr; in brcmf_c_set_joinpref_default()
96 err = brcmf_fil_iovar_data_set(ifp, "join_pref", join_pref_params, in brcmf_c_set_joinpref_default()
102 static int brcmf_c_download(struct brcmf_if *ifp, u16 flag, in brcmf_c_download() argument
114 err = brcmf_fil_iovar_data_set(ifp, var, dload_buf, in brcmf_c_download()
120 static int brcmf_c_download_blob(struct brcmf_if *ifp, in brcmf_c_download_blob() argument
124 struct brcmf_pub *drvr = ifp->drvr; in brcmf_c_download_blob()
153 err = brcmf_c_download(ifp, dl_flag, chunk_buf, chunk_len, in brcmf_c_download_blob()
166 err = brcmf_fil_iovar_int_get(ifp, statvar, &status); in brcmf_c_download_blob()
178 static int brcmf_c_process_clm_blob(struct brcmf_if *ifp) in brcmf_c_process_clm_blob() argument
180 struct brcmf_pub *drvr = ifp->drvr; in brcmf_c_process_clm_blob()
194 err = brcmf_c_download_blob(ifp, fw->data, fw->size, in brcmf_c_process_clm_blob()
201 static int brcmf_c_process_txcap_blob(struct brcmf_if *ifp) in brcmf_c_process_txcap_blob() argument
203 struct brcmf_pub *drvr = ifp->drvr; in brcmf_c_process_txcap_blob()
217 err = brcmf_c_download_blob(ifp, fw->data, fw->size, in brcmf_c_process_txcap_blob()
224 int brcmf_c_set_cur_etheraddr(struct brcmf_if *ifp, const u8 *addr) in brcmf_c_set_cur_etheraddr() argument
228 err = brcmf_fil_iovar_data_set(ifp, "cur_etheraddr", addr, ETH_ALEN); in brcmf_c_set_cur_etheraddr()
230 bphy_err(ifp->drvr, "Setting cur_etheraddr failed, %d\n", err); in brcmf_c_set_cur_etheraddr()
249 static int brcmf_c_process_cal_blob(struct brcmf_if *ifp) in brcmf_c_process_cal_blob() argument
251 struct brcmf_pub *drvr = ifp->drvr; in brcmf_c_process_cal_blob()
261 err = brcmf_c_download_blob(ifp, settings->cal_blob, settings->cal_size, in brcmf_c_process_cal_blob()
266 int brcmf_c_preinit_dcmds(struct brcmf_if *ifp) in brcmf_c_preinit_dcmds() argument
268 struct brcmf_pub *drvr = ifp->drvr; in brcmf_c_preinit_dcmds()
278 if (is_valid_ether_addr(ifp->mac_addr)) { in brcmf_c_preinit_dcmds()
280 err = brcmf_c_set_cur_etheraddr(ifp, ifp->mac_addr); in brcmf_c_preinit_dcmds()
285 err = brcmf_fil_iovar_data_get(ifp, "cur_etheraddr", ifp->mac_addr, in brcmf_c_preinit_dcmds()
286 sizeof(ifp->mac_addr)); in brcmf_c_preinit_dcmds()
292 if (ether_addr_equal_unaligned(ifp->mac_addr, brcmf_default_mac_address)) { in brcmf_c_preinit_dcmds()
294 eth_random_addr(ifp->mac_addr); in brcmf_c_preinit_dcmds()
295 ifp->ndev->addr_assign_type = NET_ADDR_RANDOM; in brcmf_c_preinit_dcmds()
296 err = brcmf_c_set_cur_etheraddr(ifp, ifp->mac_addr); in brcmf_c_preinit_dcmds()
302 memcpy(ifp->drvr->mac, ifp->mac_addr, sizeof(ifp->drvr->mac)); in brcmf_c_preinit_dcmds()
303 memcpy(ifp->drvr->wiphy->perm_addr, ifp->drvr->mac, ETH_ALEN); in brcmf_c_preinit_dcmds()
305 bus = ifp->drvr->bus_if; in brcmf_c_preinit_dcmds()
306 ri = &ifp->drvr->revinfo; in brcmf_c_preinit_dcmds()
308 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_REVINFO, in brcmf_c_preinit_dcmds()
343 err = brcmf_c_process_clm_blob(ifp); in brcmf_c_preinit_dcmds()
350 err = brcmf_c_process_txcap_blob(ifp); in brcmf_c_preinit_dcmds()
357 err = brcmf_c_process_cal_blob(ifp); in brcmf_c_preinit_dcmds()
365 err = brcmf_fil_iovar_data_get(ifp, "ver", buf, sizeof(buf)); in brcmf_c_preinit_dcmds()
384 strscpy(ifp->drvr->fwver, ptr + 1, sizeof(ifp->drvr->fwver)); in brcmf_c_preinit_dcmds()
388 err = brcmf_fil_iovar_data_get(ifp, "clmver", buf, sizeof(buf)); in brcmf_c_preinit_dcmds()
401 memcpy(ifp->drvr->clmver, clmver, sizeof(ifp->drvr->clmver)); in brcmf_c_preinit_dcmds()
407 err = brcmf_fil_iovar_int_set(ifp, "mpc", 1); in brcmf_c_preinit_dcmds()
413 brcmf_c_set_joinpref_default(ifp); in brcmf_c_preinit_dcmds()
416 err = brcmf_fil_iovar_data_get(ifp, "event_msgs", fweh->event_mask, in brcmf_c_preinit_dcmds()
429 err = brcmf_fil_iovar_data_set(ifp, "event_msgs", fweh->event_mask, in brcmf_c_preinit_dcmds()
437 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_CHANNEL_TIME, in brcmf_c_preinit_dcmds()
446 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_UNASSOC_TIME, in brcmf_c_preinit_dcmds()
455 (void)brcmf_fil_iovar_int_set(ifp, "txbf", 1); in brcmf_c_preinit_dcmds()