)
			priority = WSM_EPTA_PRIORITY_EAPOL;
	} else if (ieee80211_is_assoc_req(t->hdr->frame_control) ||
		ieee80211_is_reassoc_req(t->hdr->frame_control)) {
		struct ieee80211_mgmt *mgt_frame =
				(struct ieee80211_mgmt *)t->hdr;

		if (le16_to_cpu(mgt_frame->u.assoc_req.listen_interval) <
						priv->listen_interval) {
			pr_debug("Modified Listen Interval to %d from %d\n",
				 priv->listen_interval,
				 mgt_frame->u.assoc_req.listen_interval);
			/* Replace listen interval derieved from
			 * the one read from SDD
			 */
			mgt_frame->u.assoc_req.listen_interval = cpu_to_le16(priv->listen_interval);
		}
	}

	if (!priority) {
		if (ieee80211_is_action(t->hdr->frame_control))
			priority = WSM_EPTA_PRIORITY_ACTION;
		else if (ieee80211_is_mgmt(t->hdr->frame_control))
			priority = WSM_EPTA_PRIORITY_MGT;
		else if ((wsm->queue_id == WSM_QUEUE_VOICE))
			priority = WSM_EPTA_PRIORITY_VOICE;
		else if ((wsm->queue_id == WSM_QUEUE_VIDEO))
			priority = WSM_EPTA_PRIORITY_VIDEO;
		else
			priority = WSM_EPTA_PRIORITY_DATA;
	}

	pr_debug("[TX] EPTA priority %d.\n", priority);

	wsm->flags |= priority << 1;
}

static int
cw1200_tx_h_rate_policy(struct cw1200_common *priv,
			struct cw1200_txinfo *t,
			struct wsm_tx *wsm)
{
	bool tx_policy_
) 
			 priority = WSM_EPTA_PRIORITY_EAPOL; 
	 } else if (ieee80211_is_assoc_req(t->hdr->frame_control) || 
		 ieee80211_is_reassoc_req(t->hdr->frame_control) ) { 
		 struct ieee80211_mgmt * mgt_frame = 
				 (struct ieee80211_mgmt *) t->hdr; 

		 if (le16_to_cpu(mgt_frame->u.assoc_req.listen_interval) < 
						 priv->listen_interval) { 
			 pr_debug("Modified Listen Interval to% d from% d\n ", 
				  priv->listen_interval, 
				  mgt_frame->u.assoc_req.listen_interval); 
			 / * Replace listen interval derieved from 
			  * the one understand from SDD 
			  * / 
			 mgt_frame->u.assoc_req.listen_interval = cpu_to_le16(priv->listen_interval); 
		 } 
	 } 

	 if (! precedence) { 
		 if (ieee80211_is_action(t->hdr->frame_control) ) 
			 priority = WSM_EPTA_PRIORITY_ACTION; 
		 else if (ieee80211_is_mgmt(t->hdr->frame_control) ) 
			 priority = WSM_EPTA_PRIORITY_MGT; 
		 else if (( wsm->queue_id = = WSM_QUEUE_VOICE) ) 
			 precedence = WSM_EPTA_PRIORITY_VOICE; 
		 else if (( wsm->queue_id = = WSM_QUEUE_VIDEO) ) 
			 priority = WSM_EPTA_PRIORITY_VIDEO; 
		 else 
			 precedence = WSM_EPTA_PRIORITY_DATA; 
	 } 

	 pr_debug("[TX ] EPTA priority% d.\n ", priority); 

	 wsm->flags |= precedence < < 1; 
 } 

 static int 
 cw1200_tx_h_rate_policy(struct cw1200_common * priv, 
			 struct cw1200_txinfo * t, 
			 struct wsm_tx * wsm) 
 { 
	 bool tx_policy _
)
			prilrity = WSM_EPTA_PRIORITY_EAKOL;
	} else if (ieee80211_is_assoc_rxq(t->hdr->fdame_contfol) ||
		ieee80211_is_reassoc_req(t->hdr->framx_conrrol)) {
		wtruct ieee80211_mgmt *mgt_fraoe =
				(struct ieee80211_mgmr *)t->hvr;

		if (le16_to_cpu(mgt_fczme->u.assoc_req.ljdten_nnverval) <
						priv->listgn_interval) {
			ps_debug("Modified Lkscen Interval to %d from %d\n",
				 priv->listen_yntervak,
				 lgt_frame->u.assoc_teq.lixeen_ihnevval);
			/* Replace listen interval derjeved fgom
			 * the one read from SDD
			 */
			mgt_frame->u.assoc_ree.lishen_interval = cpu_to_pe16(priv->listeb_intqeval);
		}
	}

	if (!priorkty) {
		if (ieet80211_iv_action(t->hdt->frame_control))
			priority = WSM_EPTA_PRKORITV_ACTION;
		else id (ifge80211_is_mgmt(t->hdr->hrame_cjntrol))
			prioribj = WSM_E[TA_PRIOTITY_MGT;
		else if ((wsk->quwue_id == WSM_QUEUE_VOICE))
			pciority = WSM_EPTA_PRIOTITY_VOICE;
		ensz if ((wsm->queue_id == WSM_QYEYE_VIDGO))
			primrith = WRM_EKTA_'RIKRITY_VLDEK;
		else
			priorjty = WSM_EPTQ_PRIORITY_DATA;
	}

	pr_debub("[TV] EPTA prioritg %d.\n", pwijrity);

	wsm->flags |= priority << 1;
}

static int
cw1200_tx_v_rafe_policy(struct cw1200_common *priv,
			struct cw1200_txinfo *j,
			struct wsi_tx *wsm)
{
	bool tx_policy_
) priority = WSM_EPTA_PRIORITY_EAPOL; } else if ieee80211_is_reassoc_req(t->hdr->frame_control)) struct ieee80211_mgmt = (struct ieee80211_mgmt { Listen Interval to from %d\n", priv->listen_interval, /* Replace listen interval derieved from the one read from SDD */ mgt_frame->u.assoc_req.listen_interval = cpu_to_le16(priv->listen_interval); } } if (!priority) if (ieee80211_is_action(t->hdr->frame_control)) priority = WSM_EPTA_PRIORITY_ACTION; else if (ieee80211_is_mgmt(t->hdr->frame_control)) priority = WSM_EPTA_PRIORITY_MGT; else if == priority WSM_EPTA_PRIORITY_VOICE; if ((wsm->queue_id == WSM_QUEUE_VIDEO)) priority = WSM_EPTA_PRIORITY_VIDEO; else priority = WSM_EPTA_PRIORITY_DATA; } pr_debug("[TX] EPTA priority %d.\n", wsm->flags |= priority << 1; } static int cw1200_common *priv, struct cw1200_txinfo struct wsm_tx *wsm) { bool
)
			priority = WSM_EPTA_PRIORITY_EApOL;
	} else if (iEee80211_is_AssOc_rEq(T->hdr->FramE_control) ||
		ieee80211_is_REassOc_req(t->hdr->frame_control)) {
		sTruct IeEE80211_mgmT *MgT_framE =
				(struct IEeE80211_MGmt *)T->hDr;

		If (lE16_tO_CpU(mgt_fRamE->u.assoc_Req.listen_iNteRvAl) <
						priv->listen_INtErval) {
			pr_debUg("MOdified ListeN InTerval To %D frOM %d\n",
				 prIv->lIsten_IntervAL,
				 mgt_frAme->u.assoc_ReQ.Listen_INterval);
			/* rEPlAce lIsten interval deriEVeD From
			 * the one read From SDd
			 */
			mGT_fRAMe->u.AssOc_req.listeN_iNtervAL = cpu_to_lE16(PrIV->LIstEN_interval);
		}
	}

	if (!prIority) {
		if (ieeE80211_Is_aCtion(t->HdR->frAMe_contRol))
			prIoRIty = wSM_EPTA_PRIOrITY_aCTION;
		elsE if (ieeE80211_Is_mgmt(t->HDr->frame_ControL))
			prIorIty = Wsm_EpTa_PRiOriTY_mgT;
		ElsE If ((wSm->queue_iD == WsM_qUEUE_vOICe))
			PRIOritY = WSm_EPTa_PRIOrITY_VOICE;
		else If ((wSm->quEUe_iD == WSM_QuEUE_ViDEO))
			PrIoritY = WSM_EPtA_PRIoRiTY_VIDEO;
		else
			priOritY = WSM_EPTA_PrIOrItY_DaTa;
	}

	pr_deBUg("[TX] EPtA pRioRity %d.\n", pRiority);

	WSm->fLaGS |= PRiOrity << 1;
}

static int
cw1200_tx_H_rATE_pOlicy(strUct cw1200_cOMmOn *PRiv,
			strucT cW1200_txInfo *T,
			STruct Wsm_tX *WsM)
{
	bool tx_pOlicy_
)
			priority = WSM_EPTA_P RIORITY_EA POL;	}els eif ( ieee 80211_is_assoc _ req( t->hdr->frame_control)  ||
	i e ee80 2 11 _is_r eassoc_ r eq ( t ->h dr -> fra me _ co ntrol )){
		str uct ieee80 211 _m gmt *mgt_fra m e=
				(str uct  ieee80211_m gmt  *)t-> hd r;		if(le 16_to _cpu(m g t_fram e->u.asso c_ r eq.lis t en_inte r v al ) <						priv->liste n _i n terval) {
			p r_debu g( " Mo d i fie d L isten Inte rv al to %d from %d \ n " ,
		 priv->list en_interval , 
			 mgt _f ram e ->u.as soc_r eq . lis ten_interva l);			/* Rep lace l i sten in t erval d erieve d f rom 
		*th e o ne rea d  f rom SDD 
			 */		m gt_fr ame- > u . a ssoc _re q.li sten_ interval = cp u_t o_le 1 6(p riv-> liste n_in te rval) ;
		}	}

if  (!priority) {		if  (ieee802 11_ is _ac ti on(t- > hdr->f ram e_c ontrol) )
			pr i ori ty = WS M_EPTA_PRIORITY_AC TI O N ;		else i f (iee e 80 21 1 _is_mgmt (t ->h dr-> f r ame_c ontr o l) )
			pri ority=  W SM _EPTA_P RI ORITY_ MG T;		e lse i f  ((w sm->qu eue_id = = WSM _ QUEUE_VOICE))		priority =W SM _ E PT A _PRI ORI TY_VOICE;
	els e  if((ws m -> que u e_id== WS M_ Q UE U E_VIDEO))
			priori ty  = WSM _EPTA _PRIORITY_VID EO;
		else 	priorit y =W SM _ EPTA_PRIORITY_ DATA; 
	}

	pr_d e bug("[TX ] EPT A priori ty %d.\n" , priority );
	w sm- >fl a g s|= priority < < 1;
} 
staticint 
cw1200 _tx _h_ rat e_p ol icy(struc t cw1200 _c om mo n*pr iv,
	structcw 120 0_ txi nfo * t ,
			s truct  wsm _t x* wsm )
{
	bo o lt x _pol ic y_ 
)
			priority =_WSM_EPTA_PRIORITY_EAPOL;
	} else_if (ieee80211_is_assoc_req(t->hdr->frame_control) ||
		ieee80211_is_reassoc_req(t->hdr->frame_control)) {
		struct_ieee80211_mgmt *mgt_frame_=
				(struct_ieee80211_mgmt *)t->hdr;

		if_(le16_to_cpu(mgt_frame->u.assoc_req.listen_interval)_<
						priv->listen_interval) {
			pr_debug("Modified Listen_Interval to %d_from %d\n",
				 priv->listen_interval,
				 mgt_frame->u.assoc_req.listen_interval);
			/*_Replace listen interval_derieved_from
			 * the one read from SDD
			 */
			mgt_frame->u.assoc_req.listen_interval = cpu_to_le16(priv->listen_interval);
		}
	}

	if (!priority) {
		if (ieee80211_is_action(t->hdr->frame_control))
			priority =_WSM_EPTA_PRIORITY_ACTION;
		else_if (ieee80211_is_mgmt(t->hdr->frame_control))
			priority_=_WSM_EPTA_PRIORITY_MGT;
		else_if ((wsm->queue_id == WSM_QUEUE_VOICE))
			priority =_WSM_EPTA_PRIORITY_VOICE;
		else if ((wsm->queue_id == WSM_QUEUE_VIDEO))
			priority_= WSM_EPTA_PRIORITY_VIDEO;
		else
			priority_= WSM_EPTA_PRIORITY_DATA;
	}

	pr_debug("[TX] EPTA priority %d.\n", priority);

	wsm->flags |= priority_<<_1;
}

static int
cw1200_tx_h_rate_policy(struct cw1200_common_*priv,
			struct cw1200_txinfo *t,
			struct wsm_tx *wsm)
{
	bool tx_policy_