Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ba3eb03 authored by David S. Miller's avatar David S. Miller
Browse files
parents 35700212 18b6c9a2
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -850,6 +850,7 @@ static int ar9170_rx_mac_status(struct ar9170 *ar,
		}
		break;

	case AR9170_RX_STATUS_MODULATION_DUPOFDM:
	case AR9170_RX_STATUS_MODULATION_OFDM:
		switch (head->plcp[0] & 0xf) {
		case 0xb:
@@ -897,8 +898,7 @@ static int ar9170_rx_mac_status(struct ar9170 *ar,
		status->flag |= RX_FLAG_HT;
		break;

	case AR9170_RX_STATUS_MODULATION_DUPOFDM:
		/* XXX */
	default:
		if (ar9170_nag_limiter(ar))
			printk(KERN_ERR "%s: invalid modulation\n",
			       wiphy_name(ar->hw->wiphy));
@@ -2441,6 +2441,7 @@ static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue,
}

static int ar9170_ampdu_action(struct ieee80211_hw *hw,
			       struct ieee80211_vif *vif,
			       enum ieee80211_ampdu_mlme_action action,
			       struct ieee80211_sta *sta, u16 tid, u16 *ssn)
{
@@ -2470,7 +2471,7 @@ static int ar9170_ampdu_action(struct ieee80211_hw *hw,
		tid_info->state = AR9170_TID_STATE_PROGRESS;
		tid_info->active = false;
		spin_unlock_irqrestore(&ar->tx_ampdu_list_lock, flags);
		ieee80211_start_tx_ba_cb_irqsafe(hw, sta->addr, tid);
		ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
		break;

	case IEEE80211_AMPDU_TX_STOP:
@@ -2480,7 +2481,7 @@ static int ar9170_ampdu_action(struct ieee80211_hw *hw,
		tid_info->active = false;
		skb_queue_purge(&tid_info->queue);
		spin_unlock_irqrestore(&ar->tx_ampdu_list_lock, flags);
		ieee80211_stop_tx_ba_cb_irqsafe(hw, sta->addr, tid);
		ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
		break;

	case IEEE80211_AMPDU_TX_OPERATIONAL:
+3 −1
Original line number Diff line number Diff line
@@ -68,8 +68,10 @@ static struct usb_device_id ar9170_usb_ids[] = {
	{ USB_DEVICE(0x0cf3, 0x1002) },
	/* Cace Airpcap NX */
	{ USB_DEVICE(0xcace, 0x0300) },
	/* D-Link DWA 160A */
	/* D-Link DWA 160 A1 */
	{ USB_DEVICE(0x07d1, 0x3c10) },
	/* D-Link DWA 160 A2 */
	{ USB_DEVICE(0x07d1, 0x3a09) },
	/* Netgear WNDA3100 */
	{ USB_DEVICE(0x0846, 0x9010) },
	/* Netgear WN111 v2 */
+2 −2
Original line number Diff line number Diff line
@@ -1399,7 +1399,7 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah,
	if (i_coffd == 0 || q_coffd == 0)
		goto done;

	i_coff = ((-iq_corr) / i_coffd) & 0x3f;
	i_coff = ((-iq_corr) / i_coffd);

	/* Boundary check */
	if (i_coff > 31)
@@ -1407,7 +1407,7 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah,
	if (i_coff < -32)
		i_coff = -32;

	q_coff = (((s32)i_pwr / q_coffd) - 128) & 0x1f;
	q_coff = (((s32)i_pwr / q_coffd) - 128);

	/* Boundary check */
	if (q_coff > 15)
+0 −10
Original line number Diff line number Diff line
@@ -198,18 +198,8 @@ struct ath_txq {
	struct list_head axq_q;
	spinlock_t axq_lock;
	u32 axq_depth;
	u8 axq_aggr_depth;
	bool stopped;
	bool axq_tx_inprogress;
	struct ath_buf *axq_linkbuf;

	/* first desc of the last descriptor that contains CTS */
	struct ath_desc *axq_lastdsWithCTS;

	/* final desc of the gating desc that determines whether
	   lastdsWithCTS has been DMA'ed or not */
	struct ath_desc *axq_gatingds;

	struct list_head axq_acq;
};

+14 −5
Original line number Diff line number Diff line
@@ -231,26 +231,35 @@ void ath9k_cmn_rx_skb_postprocess(struct ath_common *common,
{
	struct ath_hw *ah = common->ah;
	struct ieee80211_hdr *hdr;
	int hdrlen, padsize;
	int hdrlen, padpos, padsize;
	u8 keyix;
	__le16 fc;

	/* see if any padding is done by the hw and remove it */
	hdr = (struct ieee80211_hdr *) skb->data;
	hdrlen = ieee80211_get_hdrlen_from_skb(skb);
	padpos = 24;
	fc = hdr->frame_control;
	if ((fc & cpu_to_le16(IEEE80211_FCTL_FROMDS|IEEE80211_FCTL_TODS)) ==
	    cpu_to_le16(IEEE80211_FCTL_FROMDS|IEEE80211_FCTL_TODS)) {
	  padpos += 6; /* ETH_ALEN */
	}
	if ((fc & cpu_to_le16(IEEE80211_STYPE_QOS_DATA|IEEE80211_FCTL_FTYPE)) ==
	    cpu_to_le16(IEEE80211_STYPE_QOS_DATA|IEEE80211_FTYPE_DATA)) {
	  padpos += 2;
	}

	/* The MAC header is padded to have 32-bit boundary if the
	 * packet payload is non-zero. The general calculation for
	 * padsize would take into account odd header lengths:
	 * padsize = (4 - hdrlen % 4) % 4; However, since only
	 * padsize = (4 - padpos % 4) % 4; However, since only
	 * even-length headers are used, padding can only be 0 or 2
	 * bytes and we can optimize this a bit. In addition, we must
	 * not try to remove padding from short control frames that do
	 * not have payload. */
	padsize = hdrlen & 3;
	if (padsize && hdrlen >= 24) {
		memmove(skb->data + padsize, skb->data, hdrlen);
	padsize = padpos & 3;
	if (padsize && skb->len>=padpos+padsize+FCS_LEN) {
		memmove(skb->data + padsize, skb->data, padpos);
		skb_pull(skb, padsize);
	}

Loading