diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index 9c346cc9476c..bfe1ad262484 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -468,6 +468,49 @@ void iwl_rx_missed_beacon_notif(struct iwl_priv *priv, | |||
468 | } | 468 | } |
469 | EXPORT_SYMBOL(iwl_rx_missed_beacon_notif); | 469 | EXPORT_SYMBOL(iwl_rx_missed_beacon_notif); |
470 | 470 | ||
471 | int iwl_rx_agg_start(struct iwl_priv *priv, const u8 *addr, int tid, u16 ssn) | ||
472 | { | ||
473 | unsigned long flags; | ||
474 | int sta_id; | ||
475 | |||
476 | sta_id = iwl_find_station(priv, addr); | ||
477 | if (sta_id == IWL_INVALID_STATION) | ||
478 | return -ENXIO; | ||
479 | |||
480 | spin_lock_irqsave(&priv->sta_lock, flags); | ||
481 | priv->stations[sta_id].sta.station_flags_msk = 0; | ||
482 | priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_ADDBA_TID_MSK; | ||
483 | priv->stations[sta_id].sta.add_immediate_ba_tid = (u8)tid; | ||
484 | priv->stations[sta_id].sta.add_immediate_ba_ssn = cpu_to_le16(ssn); | ||
485 | priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; | ||
486 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
487 | |||
488 | return iwl_send_add_sta(priv, &priv->stations[sta_id].sta, | ||
489 | CMD_ASYNC); | ||
490 | } | ||
491 | EXPORT_SYMBOL(iwl_rx_agg_start); | ||
492 | |||
493 | int iwl_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid) | ||
494 | { | ||
495 | unsigned long flags; | ||
496 | int sta_id; | ||
497 | |||
498 | sta_id = iwl_find_station(priv, addr); | ||
499 | if (sta_id == IWL_INVALID_STATION) | ||
500 | return -ENXIO; | ||
501 | |||
502 | spin_lock_irqsave(&priv->sta_lock, flags); | ||
503 | priv->stations[sta_id].sta.station_flags_msk = 0; | ||
504 | priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_DELBA_TID_MSK; | ||
505 | priv->stations[sta_id].sta.remove_immediate_ba_tid = (u8)tid; | ||
506 | priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; | ||
507 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
508 | |||
509 | return iwl_send_add_sta(priv, &priv->stations[sta_id].sta, | ||
510 | CMD_ASYNC); | ||
511 | } | ||
512 | EXPORT_SYMBOL(iwl_rx_agg_stop); | ||
513 | |||
471 | 514 | ||
472 | /* Calculate noise level, based on measurements during network silence just | 515 | /* Calculate noise level, based on measurements during network silence just |
473 | * before arriving beacon. This measurement can be done only if we know | 516 | * before arriving beacon. This measurement can be done only if we know |