# /space/home/slher/rel/Beken/v6_4_5/macsw/ip/lmac/src/ps/ps.h File Reference

Power-Save definitions. More...

`#include "rwnx_config.h"`
`#include "co_list.h"`
`#include "mac.h"`
`#include "vif_mgmt.h"`
`#include "reg_mac_pl.h"`
`#include "co_math.h"`
`#include "p2p.h"`
`#include "mesh_ps.h"`

Go to the source code of this file.

## Data Structures
struct | ps_env_tag
| PS module environment. More...
## Defines
#define | PS_VIF_WAITING_BCN CO_BIT(0)
| Station is waiting for beacon reception.
#define | PS_VIF_WAITING_BCMC CO_BIT(1)
| Station is waiting for broadcast/multicast traffic from AP.
#define | PS_VIF_WAITING_UC CO_BIT(2)
| Station is waiting for unicast traffic from AP.
#define | PS_VIF_WAITING_EOSP CO_BIT(3)
| Station is waiting for WMM-PS end of service period.
#define | PS_VIF_ASSOCIATING CO_BIT(4)
| Station is waiting for the end of the association procedure.
#define | PS_VIF_P2P_GO_PRESENT CO_BIT(5)
| P2P GO is supposed to be present.
#define | PS_VIF_P2P_WAIT_TBTT CO_BIT(6)
| P2P GO is waiting for TBTT interrupt.
#define | PS_VIF_MONITOR CO_BIT(7)
| VIF is configured for monitoring.
#define | PS_TX_CFM_UPLOADING CO_BIT(0)
| Upload of TX confirmations is ongoing.
#define | PS_SCAN_ONGOING CO_BIT(1)
| A scanning process is ongoing.
#define | PS_IDLE_REQ_PENDING CO_BIT(2)
| A request for going to IDLE is pending.
#define | PS_PSM_PAUSED CO_BIT(3)
| PSM is paused in order to allow data traffic.
#define | PS_CAC_STARTED CO_BIT(4)
| A CAC period is active.
#define | PS_ALL_UAPSD_ACS 0x0F
| Mask showing that all ACs UAPSD enabled.
#define | PS_SP_INTERRUPTED 0xff
| This value is sent to host, as the number of packet of a service period, to inicate that current service period has been interrrupted.
#define | PS_DPSM_STATE_GET(bit_pos) (ps_env.dpsm_state & (1 << PS_DPSM_STATE_ ## bit_pos))
| Indicate if specified bit is set to 1 in dpsm_state.
#define | PS_DPSM_STATE_SET(bit_pos) (ps_env.dpsm_state |= (1 << PS_DPSM_STATE_ ## bit_pos))
| Set specified bit to 1 in dpsm_state.
#define | PS_DPSM_STATE_CLEAR(bit_pos) (ps_env.dpsm_state &= ~(1 << PS_DPSM_STATE_ ## bit_pos))
| Set specified bit to 0 in dpsm_state.
## Enumerations
enum | { PS_MODE_OFF, PS_MODE_ON, PS_MODE_ON_DYN }
| Power Save mode setting. More...
enum | { PS_UAPSD_TMR_START, PS_UAPSD_TMR_STOP }
| Possible actions for UAPSD Timer. More...
enum | ps_dpsm_state_bit_pos { PS_DPSM_STATE_ON = 0, PS_DPSM_STATE_PAUSING, PS_DPSM_STATE_RESUMING, PS_DPSM_STATE_PAUSE, PS_DPSM_STATE_SET_MODE_REQ }
| Bit position description for dpsm_state variable. More...
## Functions
__INLINE bool | ps_uapsd_enabled (void)
| Checks UAPSD status.
__INLINE bool | ps_sleep_check (void)
| Checks if platform is allowed to sleep.
void | ps_init (void)
| Initialize all the entries of the station table.
void | ps_set_mode (uint8_t mode, ke_task_id_t taskid)
| Set the Power-save mode as requested by the upper layers.
bool | ps_check_tim (uint32_t a_tim, uint16_t aid)
| Check if TIM Information Element received from either an AP or a peer Mesh STA if buffered frame targeting us are announced.
void | ps_check_beacon (uint32_t tim, uint16_t len, struct vif_info_tag *vif)
| Checks the TIM IE in the beacon to know if the station has to wait for individually or group addressed traffic following this beacon.
void | ps_check_frame (uint8_t *frame, uint32_t statinfo, struct vif_info_tag *vif)
| Checks the more data bit in the data or management frame passed as parameter and behave accordingly.
void | ps_uapsd_set (struct vif_info_tag *vif, uint8_t hw_queue, bool uapsd)
| Enable/disable the UAPSD for the HW queue and VIF passed as parameters.
bool | ps_check_tx_frame (uint8_t staid, uint8_t tid)
| Check if the frame is a UAPSD trigger frame.
void | ps_check_tx_trigger_sent (struct hostdesc *hostdesc, uint32_t tx_status)
| Re-enable WAIT EOSP status after UAPSD trigger frame transmission.
void | ps_traffic_status_update (uint8_t vif_index, uint8_t new_status)
| Handle update of Traffic status generated by the Traffic Detection module.
void | ps_p2p_absence_update (struct vif_info_tag *vif, bool absent)
| Update P2P GO presence status update in order to send a trigger frame when an absence period is over after an interrupted Service Period.
## Variables
struct ps_env_tag | ps_env
| PS context used to store information related to PS module.

## Detailed Description

Power-Save definitions.

Copyright (C) RivieraWaves 2011-2019

Definition in file ps.h.