Lines Matching defs:drvr

78 struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx)
84 bphy_err(drvr, "ifidx %d out of range\n", ifidx);
89 bsscfgidx = drvr->if2bss[ifidx];
91 ifp = drvr->iflist[bsscfgidx];
137 struct brcmf_pub *drvr = ifp->drvr;
175 bphy_err(drvr, "Setting mcast_list failed, %d\n", err);
188 bphy_err(drvr, "Setting allmulti failed, %d\n", err);
196 bphy_info_once(drvr, "BRCMF_C_SET_PROMISC unsupported\n");
198 bphy_err(drvr, "Setting BRCMF_C_SET_PROMISC failed, err=%d\n",
209 struct brcmf_pub *drvr = ifp->drvr;
224 bphy_err(drvr, "add nd ip err %d\n", ret);
293 struct brcmf_pub *drvr = ifp->drvr;
301 if (drvr->bus_if->state != BRCMF_BUS_UP) {
302 bphy_err(drvr, "xmit rejected state=%d\n", drvr->bus_if->state);
320 if (!drvr->settings->iapp && brcmf_skb_is_iapp(skb)) {
327 if (skb_headroom(skb) < drvr->hdrlen || skb_header_cloned(skb)) {
328 head_delta = max_t(int, drvr->hdrlen - skb_headroom(skb), 0);
332 atomic_inc(&drvr->bus_if->stats.pktcowed);
336 bphy_err(drvr, "%s: failed to expand headroom\n",
338 atomic_inc(&drvr->bus_if->stats.pktcow_failed);
363 ret = brcmf_proto_tx_queue_data(drvr, ifp->ifidx, skb);
409 if (!ifp->drvr->settings->iapp && brcmf_skb_is_iapp(skb)) {
478 static int brcmf_rx_hdrpull(struct brcmf_pub *drvr, struct sk_buff *skb,
484 ret = brcmf_proto_hdrpull(drvr, true, skb, ifp);
502 struct brcmf_pub *drvr = bus_if->drvr;
506 if (brcmf_rx_hdrpull(drvr, skb, &ifp))
516 brcmf_fweh_process_skb(ifp->drvr, skb,
527 struct brcmf_pub *drvr = bus_if->drvr;
531 if (brcmf_rx_hdrpull(drvr, skb, &ifp))
534 brcmf_fweh_process_skb(ifp->drvr, skb, 0, GFP_KERNEL);
562 struct brcmf_pub *drvr = ifp->drvr;
565 if (drvr->revinfo.result == 0)
566 brcmu_dotrev_str(drvr->revinfo.driverrev, drev);
569 strscpy(info->fw_version, drvr->fwver, sizeof(info->fw_version));
570 strscpy(info->bus_info, dev_name(drvr->bus_if->dev),
594 struct brcmf_pub *drvr = ifp->drvr;
595 struct brcmf_bus *bus_if = drvr->bus_if;
602 bphy_err(drvr, "failed bus is not ready\n");
616 bphy_err(drvr, "failed to bring up cfg80211\n");
635 struct brcmf_pub *drvr = ifp->drvr;
646 ndev->needed_headroom += drvr->hdrlen;
651 dev_net_set(ndev, wiphy_net(cfg_to_wiphy(drvr->config)));
661 bphy_err(drvr, "couldn't register the net device\n");
672 drvr->iflist[ifp->bsscfgidx] = NULL;
693 struct brcmf_pub *drvr = ifp->drvr;
701 bphy_err(drvr, "BRCMF_C_GET_MONITOR error (%d)\n", err);
704 bphy_err(drvr, "Monitor mode is already enabled\n");
711 bphy_err(drvr, "BRCMF_C_SET_MONITOR error (%d)\n", err);
719 struct brcmf_pub *drvr = ifp->drvr;
728 bphy_err(drvr, "BRCMF_C_SET_MONITOR error (%d)\n", err);
749 struct brcmf_pub *drvr = ifp->drvr;
760 bphy_err(drvr, "Failed to register %s device\n", ndev->name);
815 struct brcmf_pub *drvr = ifp->drvr;
828 bphy_err(drvr, "couldn't register the p2p net device\n");
837 ifp->drvr->iflist[ifp->bsscfgidx] = NULL;
842 struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
850 ifp = drvr->iflist[bsscfgidx];
857 bphy_err(drvr, "ERROR: netdev:%s already exists\n",
861 drvr->iflist[bsscfgidx] = NULL;
869 if (!drvr->settings->p2p_enable && is_p2pdev) {
887 if (drvr->if2bss[ifidx] == BRCMF_BSSIDX_INVALID)
888 drvr->if2bss[ifidx] = bsscfgidx;
891 ifp->drvr = drvr;
892 drvr->iflist[bsscfgidx] = ifp;
908 static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx,
914 ifp = drvr->iflist[bsscfgidx];
916 bphy_err(drvr, "Null interface, bsscfgidx=%d\n", bsscfgidx);
951 drvr->iflist[bsscfgidx] = NULL;
952 if (drvr->if2bss[ifidx] == bsscfgidx)
953 drvr->if2bss[ifidx] = BRCMF_BSSIDX_INVALID;
958 if (!ifp || WARN_ON(ifp->drvr->iflist[ifp->bsscfgidx] != ifp))
962 brcmf_proto_del_if(ifp->drvr, ifp);
963 brcmf_del_if(ifp->drvr, ifp->bsscfgidx, locked);
970 struct brcmf_pub *drvr = ifp->drvr;
975 bphy_err(drvr, "PSM's watchdog has fired!\n");
977 err = brcmf_debug_create_memdump(ifp->drvr->bus_if, data,
980 bphy_err(drvr, "Failed to get memory dump, %d\n", err);
990 struct brcmf_pub *drvr = container_of(nb, struct brcmf_pub,
1001 ifp = drvr->iflist[idx];
1018 ifp = drvr->iflist[0];
1024 bphy_err(drvr, "fail to get arp ip table err:%d\n", ret);
1041 bphy_err(drvr, "add arp ip err %d\n", ret);
1053 bphy_err(drvr, "fail to clear arp ip table err:%d\n",
1064 bphy_err(drvr, "add arp ip err %d\n",
1081 struct brcmf_pub *drvr = container_of(nb, struct brcmf_pub,
1089 ifp = drvr->iflist[0];
1133 struct brcmf_rev_info *ri = &bus_if->drvr->revinfo;
1141 brcmf_fwvid_vendor_name(bus_if->drvr));
1155 seq_printf(s, "clmver: %s\n", bus_if->drvr->clmver);
1162 struct brcmf_pub *drvr = container_of(work, struct brcmf_pub,
1165 brcmf_bus_reset(drvr->bus_if);
1171 struct brcmf_pub *drvr = file->private_data;
1180 schedule_work(&drvr->bus_reset);
1191 static int brcmf_bus_started(struct brcmf_pub *drvr, struct cfg80211_ops *ops)
1194 struct brcmf_bus *bus_if = drvr->bus_if;
1201 ifp = brcmf_add_if(drvr, 0, 0, false, "wlan%d",
1202 is_valid_ether_addr(drvr->settings->mac) ? drvr->settings->mac : NULL);
1221 brcmf_feat_attach(drvr);
1223 ret = brcmf_proto_init_done(drvr);
1227 brcmf_proto_add_if(drvr, ifp);
1229 drvr->config = brcmf_cfg80211_attach(drvr, ops,
1230 drvr->settings->p2p_enable);
1231 if (drvr->config == NULL) {
1238 if ((!ret) && (drvr->settings->p2p_enable)) {
1239 p2p_ifp = drvr->iflist[1];
1248 drvr->inetaddr_notifier.notifier_call = brcmf_inetaddr_changed;
1249 ret = register_inetaddr_notifier(&drvr->inetaddr_notifier);
1254 drvr->inet6addr_notifier.notifier_call = brcmf_inet6addr_changed;
1255 ret = register_inet6addr_notifier(&drvr->inet6addr_notifier);
1257 unregister_inetaddr_notifier(&drvr->inetaddr_notifier);
1263 INIT_WORK(&drvr->bus_reset, brcmf_core_bus_reset);
1266 brcmf_debugfs_add_entry(drvr, "revinfo", brcmf_revinfo_read);
1267 debugfs_create_file("reset", 0600, brcmf_debugfs_get_devdir(drvr), drvr,
1269 brcmf_feat_debugfs_create(drvr);
1270 brcmf_proto_debugfs_create(drvr);
1276 bphy_err(drvr, "failed: %d\n", ret);
1277 if (drvr->config) {
1278 brcmf_cfg80211_detach(drvr->config);
1279 drvr->config = NULL;
1284 drvr->iflist[0] = NULL;
1285 drvr->iflist[1] = NULL;
1286 if (drvr->settings->ignore_probe_fail)
1296 struct brcmf_pub *drvr = NULL;
1304 wiphy = wiphy_new(ops, sizeof(*drvr));
1311 drvr = wiphy_priv(wiphy);
1312 drvr->wiphy = wiphy;
1313 drvr->ops = ops;
1314 drvr->bus_if = dev_get_drvdata(dev);
1315 drvr->bus_if->drvr = drvr;
1316 drvr->settings = settings;
1324 struct brcmf_pub *drvr = bus_if->drvr;
1330 for (i = 0; i < ARRAY_SIZE(drvr->if2bss); i++)
1331 drvr->if2bss[i] = BRCMF_BSSIDX_INVALID;
1333 mutex_init(&drvr->proto_block);
1336 drvr->hdrlen = 0;
1338 ret = brcmf_fwvid_attach(drvr);
1340 bphy_err(drvr, "brcmf_fwvid_attach failed\n");
1345 ret = brcmf_proto_attach(drvr);
1347 bphy_err(drvr, "brcmf_prot_attach failed\n");
1352 ret = brcmf_fweh_attach(drvr);
1354 bphy_err(drvr, "brcmf_fweh_attach failed\n");
1359 brcmf_fweh_register(drvr, BRCMF_E_PSM_WATCHDOG,
1362 ret = brcmf_bus_started(drvr, drvr->ops);
1364 bphy_err(drvr, "dongle is not responding: err=%d\n", ret);
1379 struct brcmf_pub *drvr = bus_if->drvr;
1381 if (drvr) {
1382 drvr->hdrlen += len;
1389 struct brcmf_pub *drvr = bus_if->drvr;
1391 if (drvr == NULL)
1394 if (drvr->iflist[0])
1395 brcmf_fil_cmd_int_set(drvr->iflist[0], BRCMF_C_TERMINATED, 1);
1409 struct brcmf_pub *drvr = bus_if->drvr;
1411 bphy_err(drvr, "Firmware has halted or crashed\n");
1415 if (drvr->bus_reset.func)
1416 schedule_work(&drvr->bus_reset);
1423 struct brcmf_pub *drvr = bus_if->drvr;
1427 if (drvr == NULL)
1431 unregister_inetaddr_notifier(&drvr->inetaddr_notifier);
1435 unregister_inet6addr_notifier(&drvr->inet6addr_notifier);
1441 if (drvr->iflist[i])
1442 brcmf_remove_interface(drvr->iflist[i], false);
1444 brcmf_bus_stop(drvr->bus_if);
1446 brcmf_fweh_detach(drvr);
1447 brcmf_proto_detach(drvr);
1449 if (drvr->mon_if) {
1450 brcmf_net_detach(drvr->mon_if->ndev, false);
1451 drvr->mon_if = NULL;
1454 if (drvr->config) {
1455 brcmf_p2p_detach(&drvr->config->p2p);
1456 brcmf_cfg80211_detach(drvr->config);
1457 drvr->config = NULL;
1460 brcmf_fwvid_detach(drvr);
1466 struct brcmf_pub *drvr = bus_if->drvr;
1468 if (!drvr)
1471 bus_if->drvr = NULL;
1473 kfree(drvr->ops);
1475 wiphy_free(drvr->wiphy);
1481 struct brcmf_if *ifp = bus_if->drvr->iflist[0];
1493 struct brcmf_pub *drvr = ifp->drvr;
1501 bphy_err(drvr, "Timed out waiting for no pending 802.1x packets\n");
1510 struct brcmf_pub *drvr = bus->drvr;
1516 if (!drvr) {
1525 if ((drvr->iflist[ifidx]) &&
1526 (drvr->iflist[ifidx]->ndev)) {
1527 ndev = drvr->iflist[ifidx]->ndev;