/* @ifp: low-level interface object. @state: discover state to set. @chanspec: channel parameters (for state @WL_P2P_DISC_ST_LISTEN only). @listen_ms: duration to listen (for state @WL_P2P_DISC_ST_LISTEN only).  */
static s32 brcmf_p2p_set_discover_state(struct brcmf_if *ifp, u8 state, u16 chanspec, u16 listen_ms)
/* @ifp: low-level interface object. @state: discover state to set. @chanspec: channel parameters (for state @WL_P2P_DISC_ST_LISTEN only). @listen_ms: duration to listen (for state @WL_P2P_DISC_ST_LISTEN only).  */
static s32 brcmf_p2p_set_discover_state(struct brcmf_if *ifp, u8 state, u16 chanspec, u16 listen_ms)
{
	struct brcmf_p2p_disc_st_le discover_state;
	s32 ret = 0;
	brcmf_dbg(TRACE, "enter\n");
	discover_state.state = state;
	discover_state.chspec = cpu_to_le16(chanspec);
	discover_state.dwell = cpu_to_le16(listen_ms);
	ret = brcmf_fil_bsscfg_data_set(ifp, "p2p_state", &discover_state,
					sizeof(discover_state));
	return ret;
}