VOID kalP2PIndicateChannelReady(IN P_GLUE_INFO_T prGlueInfo, IN UINT_64 u8SeqNum, IN UINT_32 u4ChannelNum, IN ENUM_BAND_T eBand, IN ENUM_CHNL_EXT_T eSco, IN UINT_32 u4Duration) { struct ieee80211_channel *prIEEE80211ChnlStruct = (struct ieee80211_channel *)NULL; RF_CHANNEL_INFO_T rChannelInfo; enum nl80211_channel_type eChnlType = NL80211_CHAN_NO_HT; do { if (prGlueInfo == NULL) break; kalMemZero(&rChannelInfo, sizeof(RF_CHANNEL_INFO_T)); rChannelInfo.ucChannelNum = u4ChannelNum; rChannelInfo.eBand = eBand; prIEEE80211ChnlStruct = kalP2pFuncGetChannelEntry(prGlueInfo->prP2PInfo, &rChannelInfo); kalP2pFuncGetChannelType(eSco, &eChnlType); cfg80211_ready_on_channel(prGlueInfo->prP2PInfo->prWdev, /* struct wireless_dev, */ u8SeqNum, /* u64 cookie, */ prIEEE80211ChnlStruct, /* struct ieee80211_channel * chan, */ u4Duration, /* unsigned int duration, */ GFP_KERNEL); /* gfp_t gfp */ /* allocation flags */ } while (FALSE); } /* kalP2PIndicateChannelReady */
VOID kalP2PIndicateChannelReady ( IN P_GLUE_INFO_T prGlueInfo, IN UINT_64 u8SeqNum, IN UINT_32 u4ChannelNum, IN ENUM_BAND_T eBand, IN ENUM_CHNL_EXT_T eSco, IN UINT_32 u4Duration ) { struct ieee80211_channel *prIEEE80211ChnlStruct = (struct ieee80211_channel *)NULL; RF_CHANNEL_INFO_T rChannelInfo; enum nl80211_channel_type eChnlType = NL80211_CHAN_NO_HT; P_MSG_P2P_MGMT_TX_REQUEST_T prMsgTxReq = (P_MSG_P2P_MGMT_TX_REQUEST_T)NULL; INT_32 i4Rslt = -EINVAL; P_P2P_FSM_INFO_T prP2pFsmInfo = (P_P2P_FSM_INFO_T)NULL; prP2pFsmInfo = prGlueInfo->prAdapter->rWifiVar.prP2pFsmInfo; P_P2P_CHNL_REQ_INFO_T prChnlReqInfo = &(prP2pFsmInfo->rChnlReqInfo); do { if (prGlueInfo == NULL) { break; } if (prChnlReqInfo->fgNeedIndSupp) { kalMemZero(&rChannelInfo, sizeof(RF_CHANNEL_INFO_T)); rChannelInfo.ucChannelNum = u4ChannelNum; rChannelInfo.eBand = eBand; prIEEE80211ChnlStruct = kalP2pFuncGetChannelEntry(prGlueInfo->prP2PInfo, &rChannelInfo); kalP2pFuncGetChannelType(eSco, &eChnlType); cfg80211_ready_on_channel(prGlueInfo->prP2PInfo->prDevHandler, //struct net_device * dev, u8SeqNum, //u64 cookie, prIEEE80211ChnlStruct, //struct ieee80211_channel * chan, eChnlType, //enum nl80211_channel_type channel_type, u4Duration, //unsigned int duration, GFP_KERNEL); //gfp_t gfp /* allocation flags */ } if (prChnlReqInfo->prMsgTxReq!=NULL) { prMsgTxReq = prChnlReqInfo->prMsgTxReq; mboxSendMsg(prGlueInfo->prAdapter, MBOX_ID_0, (P_MSG_HDR_T)prMsgTxReq, MSG_SEND_METHOD_UNBUF); i4Rslt = 0; prChnlReqInfo->prMsgTxReq=NULL; atomic_set(&prGlueInfo->rMgmtTxAto, 0); complete(&prGlueInfo->rMgmtTxComp); init_completion(&prGlueInfo->rMgmtTxComp); } } while (FALSE); return i4Rslt; } /* kalP2PIndicateChannelReady */
VOID kalP2PIndicateChannelExpired ( IN P_GLUE_INFO_T prGlueInfo, IN UINT_64 u8SeqNum, IN UINT_32 u4ChannelNum, IN ENUM_BAND_T eBand, IN ENUM_CHNL_EXT_T eSco ) { P_GL_P2P_INFO_T prGlueP2pInfo = (P_GL_P2P_INFO_T)NULL; struct ieee80211_channel *prIEEE80211ChnlStruct = (struct ieee80211_channel *)NULL; enum nl80211_channel_type eChnlType = NL80211_CHAN_NO_HT; RF_CHANNEL_INFO_T rRfChannelInfo; do { if (prGlueInfo == NULL) { ASSERT(FALSE); break; } prGlueP2pInfo = prGlueInfo->prP2PInfo; if (prGlueP2pInfo == NULL) { ASSERT(FALSE); break; } DBGLOG(P2P, TRACE, ("kalP2PIndicateChannelExpired\n")); rRfChannelInfo.eBand = eBand; rRfChannelInfo.ucChannelNum = u4ChannelNum; prIEEE80211ChnlStruct = kalP2pFuncGetChannelEntry(prGlueP2pInfo, &rRfChannelInfo); kalP2pFuncGetChannelType(eSco, &eChnlType); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) cfg80211_remain_on_channel_expired(&prGlueP2pInfo->wdev, //struct wireless_dev, u8SeqNum, prIEEE80211ChnlStruct, GFP_KERNEL); #else cfg80211_remain_on_channel_expired(prGlueP2pInfo->prDevHandler, //struct net_device * dev, u8SeqNum, prIEEE80211ChnlStruct, eChnlType, GFP_KERNEL); #endif } while (FALSE); } /* kalP2PIndicateChannelExpired */
VOID kalP2PIndicateChannelExpired ( IN P_GLUE_INFO_T prGlueInfo, IN P_P2P_CHNL_REQ_INFO_T prChnlReqInfo ) { P_GL_P2P_INFO_T prGlueP2pInfo = (P_GL_P2P_INFO_T)NULL; struct ieee80211_channel *prIEEE80211ChnlStruct = (struct ieee80211_channel *)NULL; enum nl80211_channel_type eChnlType = NL80211_CHAN_NO_HT; RF_CHANNEL_INFO_T rRfChannelInfo; do { if ((prGlueInfo == NULL) || (prChnlReqInfo == NULL)) { ASSERT(FALSE); break; } prGlueP2pInfo = prGlueInfo->prP2PInfo; if (prGlueP2pInfo == NULL) { ASSERT(FALSE); break; } DBGLOG(P2P, TRACE, ("kalP2PIndicateChannelExpired\n")); rRfChannelInfo.eBand = prChnlReqInfo->eBand; rRfChannelInfo.ucChannelNum = prChnlReqInfo->ucReqChnlNum; prIEEE80211ChnlStruct = kalP2pFuncGetChannelEntry(prGlueP2pInfo, &rRfChannelInfo); kalP2pFuncGetChannelType(prChnlReqInfo->eChnlSco, &eChnlType); cfg80211_remain_on_channel_expired(prGlueP2pInfo->prDevHandler, //struct net_device * dev, prChnlReqInfo->u8Cookie, prIEEE80211ChnlStruct, eChnlType, GFP_KERNEL); } while (FALSE); } /* kalP2PIndicateChannelExpired */
VOID kalP2PIndicateChannelReady ( IN P_GLUE_INFO_T prGlueInfo, IN UINT_64 u8SeqNum, IN UINT_32 u4ChannelNum, IN ENUM_BAND_T eBand, IN ENUM_CHNL_EXT_T eSco, IN UINT_32 u4Duration ) { struct ieee80211_channel *prIEEE80211ChnlStruct = (struct ieee80211_channel *)NULL; RF_CHANNEL_INFO_T rChannelInfo; enum nl80211_channel_type eChnlType = NL80211_CHAN_NO_HT; do { if (prGlueInfo == NULL) { break; } kalMemZero(&rChannelInfo, sizeof(RF_CHANNEL_INFO_T)); rChannelInfo.ucChannelNum = u4ChannelNum; rChannelInfo.eBand = eBand; prIEEE80211ChnlStruct = kalP2pFuncGetChannelEntry(prGlueInfo->prP2PInfo, &rChannelInfo); kalP2pFuncGetChannelType(eSco, &eChnlType); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) cfg80211_ready_on_channel(&prGlueInfo->prP2PInfo->wdev, //struct wireless_dev, u8SeqNum, //u64 cookie, prIEEE80211ChnlStruct, //struct ieee80211_channel * chan, u4Duration, //unsigned int duration, GFP_KERNEL); //gfp_t gfp /* allocation flags */ #else cfg80211_ready_on_channel(prGlueInfo->prP2PInfo->prDevHandler, //struct net_device * dev, u8SeqNum, //u64 cookie, prIEEE80211ChnlStruct, //struct ieee80211_channel * chan, eChnlType, //enum nl80211_channel_type channel_type, u4Duration, //unsigned int duration, GFP_KERNEL); //gfp_t gfp /* allocation flags */ #endif } while (FALSE); } /* kalP2PIndicateChannelReady */