Lines Matching +full:- +full:0

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2009-2014 Realtek Corporation.*/
21 if (((val_hmetfr >> boxnum) & BIT(0)) == 0) in _rtl8723be_check_fw_read_last_h2c()
32 u16 box_reg = 0, box_extreg = 0; in _rtl8723be_fill_h2c_command()
35 u8 buf_index = 0; in _rtl8723be_fill_h2c_command()
40 u32 h2c_waitcounter = 0; in _rtl8723be_fill_h2c_command()
47 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
48 if (rtlhal->h2c_setinprogress) { in _rtl8723be_fill_h2c_command()
53 while (rtlhal->h2c_setinprogress) { in _rtl8723be_fill_h2c_command()
54 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl8723be_fill_h2c_command()
64 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl8723be_fill_h2c_command()
67 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
69 rtlhal->h2c_setinprogress = true; in _rtl8723be_fill_h2c_command()
70 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
76 wait_writeh2c_limmit--; in _rtl8723be_fill_h2c_command()
77 if (wait_writeh2c_limmit == 0) { in _rtl8723be_fill_h2c_command()
82 boxnum = rtlhal->last_hmeboxnum; in _rtl8723be_fill_h2c_command()
84 case 0: in _rtl8723be_fill_h2c_command()
108 wait_h2c_limmit--; in _rtl8723be_fill_h2c_command()
109 if (wait_h2c_limmit == 0) { in _rtl8723be_fill_h2c_command()
120 u1b_tmp = rtl_read_byte(rtlpriv, 0x130); in _rtl8723be_fill_h2c_command()
122 "Waiting for FW read clear HMEBox(%d)!!! 0x130 = %2x\n", in _rtl8723be_fill_h2c_command()
133 memset(boxcontent, 0, sizeof(boxcontent)); in _rtl8723be_fill_h2c_command()
134 memset(boxextcontent, 0, sizeof(boxextcontent)); in _rtl8723be_fill_h2c_command()
135 boxcontent[0] = element_id; in _rtl8723be_fill_h2c_command()
144 /*boxcontent[0] &= ~(BIT(7));*/ in _rtl8723be_fill_h2c_command()
148 for (idx = 0; idx < 4; idx++) { in _rtl8723be_fill_h2c_command()
157 /*boxcontent[0] |= (BIT(7));*/ in _rtl8723be_fill_h2c_command()
159 p_cmdbuffer + buf_index+3, cmd_len-3); in _rtl8723be_fill_h2c_command()
163 for (idx = 0; idx < 4; idx++) { in _rtl8723be_fill_h2c_command()
168 for (idx = 0; idx < 4; idx++) { in _rtl8723be_fill_h2c_command()
181 rtlhal->last_hmeboxnum = boxnum + 1; in _rtl8723be_fill_h2c_command()
182 if (rtlhal->last_hmeboxnum == 4) in _rtl8723be_fill_h2c_command()
183 rtlhal->last_hmeboxnum = 0; in _rtl8723be_fill_h2c_command()
186 "pHalData->last_hmeboxnum = %d\n", in _rtl8723be_fill_h2c_command()
187 rtlhal->last_hmeboxnum); in _rtl8723be_fill_h2c_command()
190 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
191 rtlhal->h2c_setinprogress = false; in _rtl8723be_fill_h2c_command()
192 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl8723be_fill_h2c_command()
203 if (!rtlhal->fw_ready) { in rtl8723be_fill_h2c_cmd()
209 memset(tmp_cmdbuf, 0, 8); in rtl8723be_fill_h2c_cmd()
219 u8 u1_h2c_set_pwrmode[H2C_PWEMODE_LENGTH] = { 0 }; in rtl8723be_set_fw_pwrmode_cmd()
221 u8 rlbm, power_state = 0, byte5 = 0; in rtl8723be_set_fw_pwrmode_cmd()
222 u8 awake_intvl; /* DTIM = (awake_intvl - 1) */ in rtl8723be_set_fw_pwrmode_cmd()
223 struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops; in rtl8723be_set_fw_pwrmode_cmd()
224 bool bt_ctrl_lps = (rtlpriv->cfg->ops->get_btc_status() ? in rtl8723be_set_fw_pwrmode_cmd()
225 btc_ops->btc_is_bt_ctrl_lps(rtlpriv) : false); in rtl8723be_set_fw_pwrmode_cmd()
226 bool bt_lps_on = (rtlpriv->cfg->ops->get_btc_status() ? in rtl8723be_set_fw_pwrmode_cmd()
227 btc_ops->btc_is_bt_lps_on(rtlpriv) : false); in rtl8723be_set_fw_pwrmode_cmd()
237 rlbm = 0; in rtl8723be_set_fw_pwrmode_cmd()
246 awake_intvl = ppsc->reg_max_lps_awakeintvl; in rtl8723be_set_fw_pwrmode_cmd()
247 /* hw->conf.ps_dtim_period or mac->vif->bss_conf.dtim_period in rtl8723be_set_fw_pwrmode_cmd()
257 if (rtlpriv->mac80211.p2p) { in rtl8723be_set_fw_pwrmode_cmd()
263 byte5 = 0x40; in rtl8723be_set_fw_pwrmode_cmd()
267 byte5 = btc_ops->btc_get_lps_val(rtlpriv); in rtl8723be_set_fw_pwrmode_cmd()
268 power_state = btc_ops->btc_get_rpwm_val(rtlpriv); in rtl8723be_set_fw_pwrmode_cmd()
278 byte5 = 0x40; in rtl8723be_set_fw_pwrmode_cmd()
283 SET_H2CCMD_PWRMODE_PARM_MODE(u1_h2c_set_pwrmode, ((mode) ? 1 : 0)); in rtl8723be_set_fw_pwrmode_cmd()
286 bt_ctrl_lps ? 0 : ppsc->smart_ps); in rtl8723be_set_fw_pwrmode_cmd()
289 SET_H2CCMD_PWRMODE_PARM_ALL_QUEUE_UAPSD(u1_h2c_set_pwrmode, 0); in rtl8723be_set_fw_pwrmode_cmd()
296 if (rtlpriv->cfg->ops->get_btc_status()) in rtl8723be_set_fw_pwrmode_cmd()
297 btc_ops->btc_record_pwr_mode(rtlpriv, u1_h2c_set_pwrmode, in rtl8723be_set_fw_pwrmode_cmd()
305 u8 parm[3] = { 0, 0, 0 }; in rtl8723be_set_fw_media_status_rpt_cmd()
306 /* parm[0]: bit0=0-->Disconnect, bit0=1-->Connect in rtl8723be_set_fw_media_status_rpt_cmd()
307 * bit1=0-->update Media Status to MACID in rtl8723be_set_fw_media_status_rpt_cmd()
308 * bit1=1-->update Media Status from MACID to MACID_End in rtl8723be_set_fw_media_status_rpt_cmd()
309 * parm[1]: MACID, if this is INFRA_STA, MacID = 0 in rtl8723be_set_fw_media_status_rpt_cmd()
313 SET_H2CCMD_MSRRPT_PARM_MACID_IND(parm, 0); in rtl8723be_set_fw_media_status_rpt_cmd()
318 #define BEACON_PG 0 /* ->1 */
321 #define PROBERSP_PG 4 /* ->5 */
328 /* page 0 beacon */
329 0x80, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
330 0xFF, 0xFF, 0x00, 0xE0, 0x4C, 0x02, 0xB1, 0x78,
331 0xEC, 0x1A, 0x59, 0x0B, 0xAD, 0xD4, 0x20, 0x00,
332 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
333 0x64, 0x00, 0x10, 0x04, 0x00, 0x05, 0x54, 0x65,
334 0x73, 0x74, 0x32, 0x01, 0x08, 0x82, 0x84, 0x0B,
335 0x16, 0x24, 0x30, 0x48, 0x6C, 0x03, 0x01, 0x06,
336 0x06, 0x02, 0x00, 0x00, 0x2A, 0x01, 0x02, 0x32,
337 0x04, 0x0C, 0x12, 0x18, 0x60, 0x2D, 0x1A, 0x6C,
338 0x09, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
339 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
340 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
341 0x00, 0x3D, 0x00, 0xDD, 0x07, 0x00, 0xE0, 0x4C,
342 0x02, 0x02, 0x00, 0x00, 0xDD, 0x18, 0x00, 0x50,
343 0xF2, 0x01, 0x01, 0x00, 0x00, 0x50, 0xF2, 0x04,
344 0x01, 0x00, 0x00, 0x50, 0xF2, 0x04, 0x01, 0x00,
347 0x00, 0x50, 0xF2, 0x02, 0x00, 0x00, 0x00, 0x00,
348 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
349 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
350 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
351 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
352 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
354 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
356 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
357 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
358 0x10, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
359 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
360 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
361 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
362 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
364 /* page 2 ps-poll */
365 0xA4, 0x10, 0x01, 0xC0, 0xEC, 0x1A, 0x59, 0x0B,
366 0xAD, 0xD4, 0x00, 0xE0, 0x4C, 0x02, 0xB1, 0x78,
367 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
368 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
369 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
372 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
373 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
374 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
375 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
376 0x18, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
377 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
378 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
379 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
380 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
383 0x48, 0x01, 0x00, 0x00, 0xEC, 0x1A, 0x59, 0x0B,
384 0xAD, 0xD4, 0x00, 0xE0, 0x4C, 0x02, 0xB1, 0x78,
385 0xEC, 0x1A, 0x59, 0x0B, 0xAD, 0xD4, 0x00, 0x00,
386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
387 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
388 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
389 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
390 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
391 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
392 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
393 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
394 0x72, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
395 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
396 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
397 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
398 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
401 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x10,
402 0x00, 0x03, 0x00, 0xE0, 0x4C, 0x76, 0x00, 0x42,
403 0x00, 0x40, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00,
404 0x9E, 0x46, 0x15, 0x32, 0x27, 0xF2, 0x2D, 0x00,
405 0x64, 0x00, 0x00, 0x04, 0x00, 0x0C, 0x6C, 0x69,
406 0x6E, 0x6B, 0x73, 0x79, 0x73, 0x5F, 0x77, 0x6C,
407 0x61, 0x6E, 0x01, 0x04, 0x82, 0x84, 0x8B, 0x96,
408 0x03, 0x01, 0x01, 0x06, 0x02, 0x00, 0x00, 0x2A,
409 0x01, 0x00, 0x32, 0x08, 0x24, 0x30, 0x48, 0x6C,
410 0x0C, 0x12, 0x18, 0x60, 0x2D, 0x1A, 0x6C, 0x18,
411 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
412 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
413 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
414 0x3D, 0x00, 0xDD, 0x06, 0x00, 0xE0, 0x4C, 0x02,
415 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
416 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
419 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
420 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
423 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
424 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
425 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
426 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
427 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
428 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
429 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
430 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
431 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
432 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
433 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
434 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
437 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0xB2, 0xA7,
438 0xB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
439 0x84, 0xC9, 0xB2, 0xA7, 0xB3, 0x6E, 0x00, 0x00,
440 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
441 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
442 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
443 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
444 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
445 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
446 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
447 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
448 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
449 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00,
450 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
451 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
452 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
454 /* page 7 BT-qos null data */
455 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0xB2, 0xA7,
456 0xB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
457 0x84, 0xC9, 0xB2, 0xA7, 0xB3, 0x6E, 0x00, 0x00,
458 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
459 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
460 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
461 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
463 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
464 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
465 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
466 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
467 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
468 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
469 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
470 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
483 u8 u1rsvdpageloc[5] = { 0 }; in rtl8723be_set_fw_rsvdpagepkt()
492 /*--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
494 *--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
497 SET_80211_HDR_ADDRESS2(beacon, mac->mac_addr); in rtl8723be_set_fw_rsvdpagepkt()
498 SET_80211_HDR_ADDRESS3(beacon, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
500 /*------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
501 * (2) ps-poll in rtl8723be_set_fw_rsvdpagepkt()
502 *------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
505 SET_80211_PS_POLL_AID(p_pspoll, (mac->assoc_id | 0xc000)); in rtl8723be_set_fw_rsvdpagepkt()
506 SET_80211_PS_POLL_BSSID(p_pspoll, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
507 SET_80211_PS_POLL_TA(p_pspoll, mac->mac_addr); in rtl8723be_set_fw_rsvdpagepkt()
511 /*-------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
513 *-------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
516 SET_80211_HDR_ADDRESS1(nullfunc, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
517 SET_80211_HDR_ADDRESS2(nullfunc, mac->mac_addr); in rtl8723be_set_fw_rsvdpagepkt()
518 SET_80211_HDR_ADDRESS3(nullfunc, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
522 /*--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
524 *--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
527 SET_80211_HDR_ADDRESS1(p_probersp, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
528 SET_80211_HDR_ADDRESS2(p_probersp, mac->mac_addr); in rtl8723be_set_fw_rsvdpagepkt()
529 SET_80211_HDR_ADDRESS3(p_probersp, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
533 /*--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
535 *--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
538 SET_80211_HDR_ADDRESS1(qosnull, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
539 SET_80211_HDR_ADDRESS2(qosnull, mac->mac_addr); in rtl8723be_set_fw_rsvdpagepkt()
540 SET_80211_HDR_ADDRESS3(qosnull, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
544 /*--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
546 *--------------------------------------------------------- in rtl8723be_set_fw_rsvdpagepkt()
549 SET_80211_HDR_ADDRESS1(btqosnull, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
550 SET_80211_HDR_ADDRESS2(btqosnull, mac->mac_addr); in rtl8723be_set_fw_rsvdpagepkt()
551 SET_80211_HDR_ADDRESS3(btqosnull, mac->bssid); in rtl8723be_set_fw_rsvdpagepkt()
559 &reserved_page_packet[0], totalpacketlen); in rtl8723be_set_fw_rsvdpagepkt()
602 struct rtl_p2p_ps_info *p2pinfo = &(rtlps->p2p_ps_info); in rtl8723be_set_p2p_ps_offload_cmd()
603 struct p2p_ps_offload_t *p2p_ps_offload = &rtlhal->p2p_ps_offload; in rtl8723be_set_p2p_ps_offload_cmd()
611 memset(p2p_ps_offload, 0, sizeof(*p2p_ps_offload)); in rtl8723be_set_p2p_ps_offload_cmd()
616 if (p2pinfo->ctwindow > 0) { in rtl8723be_set_p2p_ps_offload_cmd()
617 p2p_ps_offload->ctwindow_en = 1; in rtl8723be_set_p2p_ps_offload_cmd()
618 ctwindow = p2pinfo->ctwindow; in rtl8723be_set_p2p_ps_offload_cmd()
622 for (i = 0 ; i < p2pinfo->noa_num ; i++) { in rtl8723be_set_p2p_ps_offload_cmd()
626 rtl_write_byte(rtlpriv, 0x5cf, (i << 4)); in rtl8723be_set_p2p_ps_offload_cmd()
627 if (i == 0) in rtl8723be_set_p2p_ps_offload_cmd()
628 p2p_ps_offload->noa0_en = 1; in rtl8723be_set_p2p_ps_offload_cmd()
630 p2p_ps_offload->noa1_en = 1; in rtl8723be_set_p2p_ps_offload_cmd()
633 rtl_write_dword(rtlpriv, 0x5E0, in rtl8723be_set_p2p_ps_offload_cmd()
634 p2pinfo->noa_duration[i]); in rtl8723be_set_p2p_ps_offload_cmd()
635 rtl_write_dword(rtlpriv, 0x5E4, in rtl8723be_set_p2p_ps_offload_cmd()
636 p2pinfo->noa_interval[i]); in rtl8723be_set_p2p_ps_offload_cmd()
641 start_time = p2pinfo->noa_start_time[i]; in rtl8723be_set_p2p_ps_offload_cmd()
642 if (p2pinfo->noa_count_type[i] != 1) { in rtl8723be_set_p2p_ps_offload_cmd()
644 start_time += p2pinfo->noa_interval[i]; in rtl8723be_set_p2p_ps_offload_cmd()
645 if (p2pinfo->noa_count_type[i] != 255) in rtl8723be_set_p2p_ps_offload_cmd()
646 p2pinfo->noa_count_type[i]--; in rtl8723be_set_p2p_ps_offload_cmd()
649 rtl_write_dword(rtlpriv, 0x5E8, start_time); in rtl8723be_set_p2p_ps_offload_cmd()
650 rtl_write_dword(rtlpriv, 0x5EC, in rtl8723be_set_p2p_ps_offload_cmd()
651 p2pinfo->noa_count_type[i]); in rtl8723be_set_p2p_ps_offload_cmd()
654 if ((p2pinfo->opp_ps == 1) || in rtl8723be_set_p2p_ps_offload_cmd()
655 (p2pinfo->noa_num > 0)) { in rtl8723be_set_p2p_ps_offload_cmd()
659 p2p_ps_offload->offload_en = 1; in rtl8723be_set_p2p_ps_offload_cmd()
661 if (P2P_ROLE_GO == rtlpriv->mac80211.p2p) { in rtl8723be_set_p2p_ps_offload_cmd()
662 p2p_ps_offload->role = 1; in rtl8723be_set_p2p_ps_offload_cmd()
663 p2p_ps_offload->allstasleep = 0; in rtl8723be_set_p2p_ps_offload_cmd()
665 p2p_ps_offload->role = 0; in rtl8723be_set_p2p_ps_offload_cmd()
667 p2p_ps_offload->discovery = 0; in rtl8723be_set_p2p_ps_offload_cmd()
672 p2p_ps_offload->discovery = 1; in rtl8723be_set_p2p_ps_offload_cmd()
676 p2p_ps_offload->discovery = 0; in rtl8723be_set_p2p_ps_offload_cmd()
677 p2pinfo->p2p_ps_state = P2P_PS_ENABLE; in rtl8723be_set_p2p_ps_offload_cmd()