btci 138 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c static void brcmf_btcoex_boost_wifi(struct brcmf_btcoex_info *btci, btci 141 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c struct brcmf_if *ifp = brcmf_get_ifp(btci->cfg->pub, 0); btci 143 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (trump_sco && !btci->saved_regs_part2) { btci 150 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 50, &btci->reg50); btci 151 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 51, &btci->reg51); btci 152 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 64, &btci->reg64); btci 153 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 65, &btci->reg65); btci 154 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 71, &btci->reg71); btci 156 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->saved_regs_part2 = true; btci 159 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg50, btci->reg51, btci->reg64, btci 160 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg65, btci->reg71); btci 169 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c } else if (btci->saved_regs_part2) { btci 172 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 50, btci->reg50); btci 173 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 51, btci->reg51); btci 174 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 64, btci->reg64); btci 175 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 65, btci->reg65); btci 176 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 71, btci->reg71); btci 180 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg50, btci->reg51, btci->reg64, btci 181 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg65, btci->reg71); btci 183 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->saved_regs_part2 = false; btci 232 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c static void btcmf_btcoex_save_part1(struct brcmf_btcoex_info *btci) btci 234 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c struct brcmf_if *ifp = btci->vif->ifp; btci 236 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (!btci->saved_regs_part1) { btci 238 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 66, &btci->reg66); btci 239 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 41, &btci->reg41); btci 240 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_read(ifp, 68, &btci->reg68); btci 241 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->saved_regs_part1 = true; btci 244 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg66, btci->reg41, btci 245 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg68); btci 252 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c static void brcmf_btcoex_restore_part1(struct brcmf_btcoex_info *btci) btci 256 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->saved_regs_part1) { btci 257 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->saved_regs_part1 = false; btci 258 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c ifp = btci->vif->ifp; btci 259 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 66, btci->reg66); btci 260 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 41, btci->reg41); btci 261 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_params_write(ifp, 68, btci->reg68); btci 264 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg66, btci->reg41, btci 265 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->reg68); btci 287 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c struct brcmf_btcoex_info *btci; btci 288 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci = container_of(work, struct brcmf_btcoex_info, work); btci 289 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->timer_on) { btci 290 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timer_on = false; btci 291 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c del_timer_sync(&btci->timer); btci 294 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c switch (btci->bt_state) { btci 300 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->bt_state = BRCMF_BT_DHCP_OPPR_WIN; btci 301 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->timeout < BRCMF_BTCOEX_OPPR_WIN_TIME) { btci 302 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c mod_timer(&btci->timer, btci->timer.expires); btci 304 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timeout -= BRCMF_BTCOEX_OPPR_WIN_TIME; btci 305 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c mod_timer(&btci->timer, btci 308 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timer_on = true; btci 312 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->dhcp_done) { btci 320 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_boost_wifi(btci, true); btci 322 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->bt_state = BRCMF_BT_DHCP_FLAG_FORCE_TIMEOUT; btci 323 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c mod_timer(&btci->timer, jiffies + btci->timeout); btci 324 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timer_on = true; btci 328 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->dhcp_done) btci 337 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_err("invalid state=%d !!!\n", btci->bt_state); btci 344 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->bt_state = BRCMF_BT_DHCP_IDLE; btci 345 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timer_on = false; btci 346 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_boost_wifi(btci, false); btci 347 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c cfg80211_crit_proto_stopped(&btci->vif->wdev, GFP_KERNEL); btci 348 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_restore_part1(btci); btci 349 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->vif = NULL; btci 360 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c struct brcmf_btcoex_info *btci = NULL; btci 363 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci = kmalloc(sizeof(struct brcmf_btcoex_info), GFP_KERNEL); btci 364 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (!btci) btci 367 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->bt_state = BRCMF_BT_DHCP_IDLE; btci 370 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timer_on = false; btci 371 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME; btci 372 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c timer_setup(&btci->timer, brcmf_btcoex_timerfunc, 0); btci 373 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->cfg = cfg; btci 374 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->saved_regs_part1 = false; btci 375 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->saved_regs_part2 = false; btci 377 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c INIT_WORK(&btci->work, brcmf_btcoex_handler); btci 379 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c cfg->btcoex = btci; btci 408 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c static void brcmf_btcoex_dhcp_start(struct brcmf_btcoex_info *btci) btci 410 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c struct brcmf_if *ifp = btci->vif->ifp; btci 412 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btcmf_btcoex_save_part1(btci); btci 417 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->dhcp_done = false; btci 418 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->bt_state = BRCMF_BT_DHCP_START; btci 419 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c schedule_work(&btci->work); btci 423 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c static void brcmf_btcoex_dhcp_end(struct brcmf_btcoex_info *btci) btci 426 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->dhcp_done = true; btci 427 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->timer_on) { btci 429 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timer_on = false; btci 430 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c del_timer_sync(&btci->timer); btci 433 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->bt_state != BRCMF_BT_DHCP_IDLE) { btci 435 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->bt_state); btci 436 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c schedule_work(&btci->work); btci 440 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_restore_part1(btci); btci 455 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c struct brcmf_btcoex_info *btci = cfg->btcoex; btci 461 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->bt_state != BRCMF_BT_DHCP_IDLE) btci 465 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->timeout = msecs_to_jiffies(duration); btci 466 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c btci->vif = vif; btci 467 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_dhcp_start(btci); btci 473 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c if (btci->bt_state != BRCMF_BT_DHCP_IDLE && btci 474 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c vif == btci->vif) { btci 475 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c brcmf_btcoex_dhcp_end(btci);