Commit 8877870f authored by David S. Miller's avatar David S. Miller
Browse files
parents 7a1abd08 7379efea
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -68,6 +68,9 @@ static struct usb_device_id btusb_table[] = {
	/* Apple MacBookPro6,2 */
	/* Apple MacBookPro6,2 */
	{ USB_DEVICE(0x05ac, 0x8218) },
	{ USB_DEVICE(0x05ac, 0x8218) },


	/* Apple MacBookAir3,1, MacBookAir3,2 */
	{ USB_DEVICE(0x05ac, 0x821b) },

	/* AVM BlueFRITZ! USB v2.0 */
	/* AVM BlueFRITZ! USB v2.0 */
	{ USB_DEVICE(0x057c, 0x3800) },
	{ USB_DEVICE(0x057c, 0x3800) },


@@ -1029,6 +1032,8 @@ static int btusb_probe(struct usb_interface *intf,


	usb_set_intfdata(intf, data);
	usb_set_intfdata(intf, data);


	usb_enable_autosuspend(interface_to_usbdev(intf));

	return 0;
	return 0;
}
}


+3 −0
Original line number Original line Diff line number Diff line
@@ -410,6 +410,9 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah,
			val &= ~(AR_WA_BIT6 | AR_WA_BIT7);
			val &= ~(AR_WA_BIT6 | AR_WA_BIT7);
		}
		}


		if (AR_SREV_9280(ah))
			val |= AR_WA_BIT22;

		if (AR_SREV_9285E_20(ah))
		if (AR_SREV_9285E_20(ah))
			val |= AR_WA_BIT23;
			val |= AR_WA_BIT23;


+1 −0
Original line number Original line Diff line number Diff line
@@ -675,6 +675,7 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)
}
}


extern struct ieee80211_ops ath9k_ops;
extern struct ieee80211_ops ath9k_ops;
extern struct pm_qos_request_list ath9k_pm_qos_req;
extern int modparam_nohwcrypt;
extern int modparam_nohwcrypt;
extern int led_blink;
extern int led_blink;


+15 −16
Original line number Original line Diff line number Diff line
@@ -35,6 +35,7 @@ static struct usb_device_id ath9k_hif_usb_ids[] = {
	{ USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */
	{ USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */
	{ USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */
	{ USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */
	{ USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */
	{ USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */
	{ USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */
	{ USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */
	{ USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */
	{ USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */
	{ USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */
	{ },
	{ },
@@ -540,11 +541,11 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb)
			return;
			return;
		}
		}


		usb_fill_int_urb(urb, hif_dev->udev,
		usb_fill_bulk_urb(urb, hif_dev->udev,
				 usb_rcvbulkpipe(hif_dev->udev,
				 usb_rcvbulkpipe(hif_dev->udev,
						 USB_REG_IN_PIPE),
						 USB_REG_IN_PIPE),
				 nskb->data, MAX_REG_IN_BUF_SIZE,
				 nskb->data, MAX_REG_IN_BUF_SIZE,
				 ath9k_hif_usb_reg_in_cb, nskb, 1);
				 ath9k_hif_usb_reg_in_cb, nskb);


		ret = usb_submit_urb(urb, GFP_ATOMIC);
		ret = usb_submit_urb(urb, GFP_ATOMIC);
		if (ret) {
		if (ret) {
@@ -720,11 +721,11 @@ static int ath9k_hif_usb_alloc_reg_in_urb(struct hif_device_usb *hif_dev)
	if (!skb)
	if (!skb)
		goto err;
		goto err;


	usb_fill_int_urb(hif_dev->reg_in_urb, hif_dev->udev,
	usb_fill_bulk_urb(hif_dev->reg_in_urb, hif_dev->udev,
			 usb_rcvbulkpipe(hif_dev->udev,
			 usb_rcvbulkpipe(hif_dev->udev,
					 USB_REG_IN_PIPE),
					 USB_REG_IN_PIPE),
			 skb->data, MAX_REG_IN_BUF_SIZE,
			 skb->data, MAX_REG_IN_BUF_SIZE,
			 ath9k_hif_usb_reg_in_cb, skb, 1);
			 ath9k_hif_usb_reg_in_cb, skb);


	if (usb_submit_urb(hif_dev->reg_in_urb, GFP_KERNEL) != 0)
	if (usb_submit_urb(hif_dev->reg_in_urb, GFP_KERNEL) != 0)
		goto err;
		goto err;
@@ -843,14 +844,6 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev)
		goto err_fw_req;
		goto err_fw_req;
	}
	}


	/* Alloc URBs */
	ret = ath9k_hif_usb_alloc_urbs(hif_dev);
	if (ret) {
		dev_err(&hif_dev->udev->dev,
			"ath9k_htc: Unable to allocate URBs\n");
		goto err_urb;
	}

	/* Download firmware */
	/* Download firmware */
	ret = ath9k_hif_usb_download_fw(hif_dev);
	ret = ath9k_hif_usb_download_fw(hif_dev);
	if (ret) {
	if (ret) {
@@ -866,16 +859,22 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev)
	 */
	 */
	for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) {
	for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) {
		endp = &alt->endpoint[idx].desc;
		endp = &alt->endpoint[idx].desc;
		if (((endp->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK)
		if ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
				== 0x04) &&
				== USB_ENDPOINT_XFER_INT) {
		    ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
				== USB_ENDPOINT_XFER_INT)) {
			endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK;
			endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK;
			endp->bmAttributes |= USB_ENDPOINT_XFER_BULK;
			endp->bmAttributes |= USB_ENDPOINT_XFER_BULK;
			endp->bInterval = 0;
			endp->bInterval = 0;
		}
		}
	}
	}


	/* Alloc URBs */
	ret = ath9k_hif_usb_alloc_urbs(hif_dev);
	if (ret) {
		dev_err(&hif_dev->udev->dev,
			"ath9k_htc: Unable to allocate URBs\n");
		goto err_urb;
	}

	return 0;
	return 0;


err_fw_download:
err_fw_download:
+13 −2
Original line number Original line Diff line number Diff line
@@ -484,6 +484,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
		ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
		ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
			  "Failed allocating banks for "
			  "Failed allocating banks for "
			  "external radio\n");
			  "external radio\n");
		ath9k_hw_rf_free_ext_banks(ah);
		return ecode;
		return ecode;
	}
	}


@@ -952,7 +953,10 @@ static void ath9k_hw_set_operating_mode(struct ath_hw *ah, int opmode)
		REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
		REG_SET_BIT(ah, AR_CFG, AR_CFG_AP_ADHOC_INDICATION);
		break;
		break;
	case NL80211_IFTYPE_STATION:
	case NL80211_IFTYPE_STATION:
	case NL80211_IFTYPE_MONITOR:
		REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE);
		break;
	default:
		if (ah->is_monitoring)
			REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE);
			REG_WRITE(ah, AR_STA_ID1, val | AR_STA_ID1_KSRCH_MODE);
		break;
		break;
	}
	}
@@ -1634,7 +1638,6 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)


	switch (ah->opmode) {
	switch (ah->opmode) {
	case NL80211_IFTYPE_STATION:
	case NL80211_IFTYPE_STATION:
	case NL80211_IFTYPE_MONITOR:
		REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(next_beacon));
		REG_WRITE(ah, AR_NEXT_TBTT_TIMER, TU_TO_USEC(next_beacon));
		REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff);
		REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff);
		REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff);
		REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff);
@@ -1663,6 +1666,14 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
			AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN;
			AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN;
		break;
		break;
	default:
	default:
		if (ah->is_monitoring) {
			REG_WRITE(ah, AR_NEXT_TBTT_TIMER,
					TU_TO_USEC(next_beacon));
			REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, 0xffff);
			REG_WRITE(ah, AR_NEXT_SWBA, 0x7ffff);
			flags |= AR_TBTT_TIMER_EN;
			break;
		}
		ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON,
		ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON,
			  "%s: unsupported opmode: %d\n",
			  "%s: unsupported opmode: %d\n",
			  __func__, ah->opmode);
			  __func__, ah->opmode);
Loading