Staging driver fixes for 4.0-rc5

Here are 4 small staging driver fixes, all for the vt6656 and vt6655
 drivers, that resolve some reported issues with them.
 
 All of these patches have been in linux next for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlUOmQ4ACgkQMUfUDdst+yl9zgCguQMirGlclUg8bAKQ4AxSJHyO
 vCQAnjSSrN6FcfxGkxYkxdLyU1TQ8vT1
 =WxGI
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are four small staging driver fixes, all for the vt6656 and
  vt6655 drivers, that resolve some reported issues with them.

  All of these patches have been in linux next for a while"

* tag 'staging-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  vt6655: Fix late setting of byRFType.
  vt6655: RFbSetPower fix missing rate RATE_12M
  staging: vt6656: vnt_rf_setpower: fix missing rate RATE_12M
  staging: vt6655: vnt_tx_packet fix dma_idx selection.
This commit is contained in:
Linus Torvalds 2015-03-22 11:59:02 -07:00
commit 704fa7f76f
3 changed files with 17 additions and 17 deletions

View File

@ -330,16 +330,6 @@ static void device_init_registers(struct vnt_private *pDevice)
/* zonetype initial */ /* zonetype initial */
pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE]; pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
/* Get RFType */
pDevice->byRFType = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_RFTYPE);
/* force change RevID for VT3253 emu */
if ((pDevice->byRFType & RF_EMU) != 0)
pDevice->byRevId = 0x80;
pDevice->byRFType &= RF_MASK;
pr_debug("pDevice->byRFType = %x\n", pDevice->byRFType);
if (!pDevice->bZoneRegExist) if (!pDevice->bZoneRegExist)
pDevice->byZoneType = pDevice->abyEEPROM[EEP_OFS_ZONETYPE]; pDevice->byZoneType = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
@ -1187,12 +1177,14 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
PSTxDesc head_td; PSTxDesc head_td;
u32 dma_idx = TYPE_AC0DMA; u32 dma_idx;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
if (!ieee80211_is_data(hdr->frame_control)) if (ieee80211_is_data(hdr->frame_control))
dma_idx = TYPE_AC0DMA;
else
dma_idx = TYPE_TXDMA0; dma_idx = TYPE_TXDMA0;
if (AVAIL_TD(priv, dma_idx) < 1) { if (AVAIL_TD(priv, dma_idx) < 1) {
@ -1206,6 +1198,9 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
head_td->pTDInfo->skb = skb; head_td->pTDInfo->skb = skb;
if (dma_idx == TYPE_AC0DMA)
head_td->pTDInfo->byFlags = TD_FLAGS_NETIF_SKB;
priv->iTDUsed[dma_idx]++; priv->iTDUsed[dma_idx]++;
/* Take ownership */ /* Take ownership */
@ -1234,13 +1229,10 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
head_td->buff_addr = cpu_to_le32(head_td->pTDInfo->skb_dma); head_td->buff_addr = cpu_to_le32(head_td->pTDInfo->skb_dma);
if (dma_idx == TYPE_AC0DMA) { if (head_td->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB)
head_td->pTDInfo->byFlags = TD_FLAGS_NETIF_SKB;
MACvTransmitAC0(priv->PortOffset); MACvTransmitAC0(priv->PortOffset);
} else { else
MACvTransmit0(priv->PortOffset); MACvTransmit0(priv->PortOffset);
}
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
@ -1778,6 +1770,12 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
MACvInitialize(priv->PortOffset); MACvInitialize(priv->PortOffset);
MACvReadEtherAddress(priv->PortOffset, priv->abyCurrentNetAddr); MACvReadEtherAddress(priv->PortOffset, priv->abyCurrentNetAddr);
/* Get RFType */
priv->byRFType = SROMbyReadEmbedded(priv->PortOffset, EEP_OFS_RFTYPE);
priv->byRFType &= RF_MASK;
dev_dbg(&pcid->dev, "RF Type = %x\n", priv->byRFType);
device_get_options(priv); device_get_options(priv);
device_set_options(priv); device_set_options(priv);
/* Mask out the options cannot be set to the chip */ /* Mask out the options cannot be set to the chip */

View File

@ -794,6 +794,7 @@ bool RFbSetPower(
break; break;
case RATE_6M: case RATE_6M:
case RATE_9M: case RATE_9M:
case RATE_12M:
case RATE_18M: case RATE_18M:
byPwr = priv->abyOFDMPwrTbl[uCH]; byPwr = priv->abyOFDMPwrTbl[uCH];
if (priv->byRFType == RF_UW2452) if (priv->byRFType == RF_UW2452)

View File

@ -640,6 +640,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
break; break;
case RATE_6M: case RATE_6M:
case RATE_9M: case RATE_9M:
case RATE_12M:
case RATE_18M: case RATE_18M:
case RATE_24M: case RATE_24M:
case RATE_36M: case RATE_36M: