Lines Matching defs:common

25  * @common: Pointer to the driver private structure.
29 static u8 rsi_determine_min_weight_queue(struct rsi_common *common)
31 struct wmm_qinfo *tx_qinfo = common->tx_qinfo;
36 q_len = skb_queue_len(&common->tx_queue[ii]);
38 common->min_weight = tx_qinfo[ii].weight;
48 * @common: Pointer to the driver private structure.
52 static bool rsi_recalculate_weights(struct rsi_common *common)
54 struct wmm_qinfo *tx_qinfo = common->tx_qinfo;
60 q_len = skb_queue_len(&common->tx_queue[ii]);
65 ((tx_qinfo[ii].weight > common->min_weight) ?
66 tx_qinfo[ii].weight - common->min_weight : 0);
86 * @common: Pointer to the driver private structure.
91 static u32 rsi_get_num_pkts_dequeue(struct rsi_common *common, u8 q_num)
93 struct rsi_hw *adapter = common->priv;
96 s16 txop = common->tx_qinfo[q_num].txop * 32;
106 if (skb_queue_len(&common->tx_queue[q_num]))
107 skb = skb_peek(&common->tx_queue[q_num]);
116 common->band,
121 if (skb_queue_len(&common->tx_queue[q_num]) - pkt_cnt)
134 * @common: Pointer to the driver private structure.
138 static u8 rsi_core_determine_hal_queue(struct rsi_common *common)
145 if (skb_queue_len(&common->tx_queue[MGMT_BEACON_Q])) {
149 if (skb_queue_len(&common->tx_queue[MGMT_SOFT_Q])) {
150 if (!common->mgmt_q_block)
155 if (common->hw_data_qs_blocked)
158 if (common->pkt_cnt != 0) {
159 --common->pkt_cnt;
160 return common->selected_qnum;
166 q_num = rsi_determine_min_weight_queue(common);
172 q_len = skb_queue_len(&common->tx_queue[ii]);
173 if (((common->tx_qinfo[ii].pkt_contended) &&
174 (common->tx_qinfo[ii].weight < common->min_weight)) &&
176 common->min_weight = common->tx_qinfo[ii].weight;
182 common->tx_qinfo[q_num].pkt_contended = 0;
185 recontend_queue = rsi_recalculate_weights(common);
187 q_len = skb_queue_len(&common->tx_queue[q_num]);
199 common->selected_qnum = q_num;
200 q_len = skb_queue_len(&common->tx_queue[q_num]);
203 common->pkt_cnt = rsi_get_num_pkts_dequeue(common, q_num);
204 common->pkt_cnt -= 1;
213 * @common: Pointer to the driver private structure.
218 static void rsi_core_queue_pkt(struct rsi_common *common,
229 skb_queue_tail(&common->tx_queue[q_num], skb);
235 * @common: Pointer to the driver private structure.
240 static struct sk_buff *rsi_core_dequeue_pkt(struct rsi_common *common,
249 return skb_dequeue(&common->tx_queue[q_num]);
257 * @common: Pointer to the driver private structure.
261 void rsi_core_qos_processor(struct rsi_common *common)
263 struct rsi_hw *adapter = common->priv;
271 q_num = rsi_core_determine_hal_queue(common);
279 if (common->hibernate_resume)
282 mutex_lock(&common->tx_lock);
286 mutex_unlock(&common->tx_lock);
291 ((skb_queue_len(&common->tx_queue[q_num])) <=
298 skb = rsi_core_dequeue_pkt(common, q_num);
301 mutex_unlock(&common->tx_lock);
305 status = rsi_send_pkt_to_bus(common, skb);
309 if (common->coex_mode > 1) {
310 status = rsi_coex_send_pkt(common, skb,
315 status = rsi_send_mgmt_pkt(common, skb);
317 status = rsi_send_data_pkt(common, skb);
324 mutex_unlock(&common->tx_lock);
328 common->tx_stats.total_tx_pkt_send[q_num]++;
331 mutex_unlock(&common->tx_lock);
338 struct rsi_sta *rsi_find_sta(struct rsi_common *common, u8 *mac_addr)
342 for (i = 0; i < common->max_stations; i++) {
343 if (!common->stations[i].sta)
345 if (!(memcmp(common->stations[i].sta->addr,
347 return &common->stations[i];
369 * @common: Pointer to the driver private structure.
374 void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb)
376 struct rsi_hw *adapter = common->priv;
389 if (common->fsm_state != FSM_MAC_INIT_DONE) {
393 if (common->wow_flags & RSI_WOW_ENABLED) {
419 common->eapol4_confirm = false;
420 rsi_hal_send_sta_notify_frame(common,
431 if (rsi_prepare_mgmt_desc(common, skb)) {
453 rsta = rsi_find_sta(common, wh->addr1);
475 if (rsi_prepare_data_desc(common, skb)) {
482 ((skb_queue_len(&common->tx_queue[q_num]) + 1) >=
487 rsi_set_event(&common->tx_thread.event);
491 rsi_core_queue_pkt(common, skb);
493 rsi_set_event(&common->tx_thread.event);
500 ieee80211_free_txskb(common->priv->hw, skb);