Lines Matching refs:twt
2317 static int mt7996_mac_check_twt_req(struct ieee80211_twt_setup *twt) in mt7996_mac_check_twt_req() argument
2325 if (twt->control & IEEE80211_TWT_CONTROL_NEG_TYPE_BROADCAST) in mt7996_mac_check_twt_req()
2329 if (twt->control & IEEE80211_TWT_CONTROL_WAKE_DUR_UNIT) in mt7996_mac_check_twt_req()
2332 twt_agrt = (struct ieee80211_twt_params *)twt->params; in mt7996_mac_check_twt_req()
2352 struct ieee80211_twt_setup *twt) in mt7996_mac_add_twt_setup() argument
2356 struct ieee80211_twt_params *twt_agrt = (void *)twt->params; in mt7996_mac_add_twt_setup()
2364 if (mt7996_mac_check_twt_req(twt)) in mt7996_mac_add_twt_setup()
2369 if (dev->twt.n_agrt == MT7996_MAX_TWT_AGRT) in mt7996_mac_add_twt_setup()
2372 if (hweight8(msta->twt.flowid_mask) == ARRAY_SIZE(msta->twt.flow)) in mt7996_mac_add_twt_setup()
2375 flowid = ffs(~msta->twt.flowid_mask) - 1; in mt7996_mac_add_twt_setup()
2379 table_id = ffs(~dev->twt.table_mask) - 1; in mt7996_mac_add_twt_setup()
2383 flow = &msta->twt.flow[flowid]; in mt7996_mac_add_twt_setup()
2407 twt_agrt->twt = cpu_to_le64(flow_tsf); in mt7996_mac_add_twt_setup()
2411 flow->tsf = le64_to_cpu(twt_agrt->twt); in mt7996_mac_add_twt_setup()
2417 dev->twt.table_mask |= BIT(table_id); in mt7996_mac_add_twt_setup()
2418 msta->twt.flowid_mask |= BIT(flowid); in mt7996_mac_add_twt_setup()
2419 dev->twt.n_agrt++; in mt7996_mac_add_twt_setup()
2426 twt->control = (twt->control & IEEE80211_TWT_CONTROL_WAKE_DUR_UNIT) | in mt7996_mac_add_twt_setup()
2427 (twt->control & IEEE80211_TWT_CONTROL_RX_DISABLED); in mt7996_mac_add_twt_setup()
2438 if (flowid >= ARRAY_SIZE(msta->twt.flow)) in mt7996_mac_twt_teardown_flow()
2441 if (!(msta->twt.flowid_mask & BIT(flowid))) in mt7996_mac_twt_teardown_flow()
2444 flow = &msta->twt.flow[flowid]; in mt7996_mac_twt_teardown_flow()
2450 msta->twt.flowid_mask &= ~BIT(flowid); in mt7996_mac_twt_teardown_flow()
2451 dev->twt.table_mask &= ~BIT(flow->table_id); in mt7996_mac_twt_teardown_flow()
2452 dev->twt.n_agrt--; in mt7996_mac_twt_teardown_flow()