History

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.

Linus Torvalds committed 11 years ago

Commit 704fa7f2 parents b2f45ee 1f51d583 files · +17 −17Browse files

Unified · Split

3 files
  1. drivers/staging/vt6655/device_main.c +15 −17
  2. drivers/staging/vt6655/rf.c +1 −0
  3. drivers/staging/vt6656/rf.c +1 −0
drivers/staging/vt6655/device_main.c+15−17
@@ -330,16 +330,6 @@ static void device_init_registers(struct vnt_private *pDevice) · 329 unmodified lines
330330 /* zonetype initial */
331331 pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
332332
333− /* Get RFType */
334− pDevice->byRFType = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_RFTYPE);
335−
336− /* force change RevID for VT3253 emu */
337− if ((pDevice->byRFType & RF_EMU) != 0)
338− pDevice->byRevId = 0x80;
339−
340− pDevice->byRFType &= RF_MASK;
341− pr_debug("pDevice->byRFType = %x\n", pDevice->byRFType);
342−
343333 if (!pDevice->bZoneRegExist)
344334 pDevice->byZoneType = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
345335
@@ -1187,12 +1177,14 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) · 841 unmodified lines
11871177 {
11881178 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
11891179 PSTxDesc head_td;
1190− u32 dma_idx = TYPE_AC0DMA;
1180+ u32 dma_idx;
11911181 unsigned long flags;
11921182
11931183 spin_lock_irqsave(&priv->lock, flags);
11941184
1195− if (!ieee80211_is_data(hdr->frame_control))
1185+ if (ieee80211_is_data(hdr->frame_control))
1186+ dma_idx = TYPE_AC0DMA;
1187+ else
11961188 dma_idx = TYPE_TXDMA0;
11971189
11981190 if (AVAIL_TD(priv, dma_idx) < 1) {
@@ -1206,6 +1198,9 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) · 7 unmodified lines
12061198
12071199 head_td->pTDInfo->skb = skb;
12081200
1201+ if (dma_idx == TYPE_AC0DMA)
1202+ head_td->pTDInfo->byFlags = TD_FLAGS_NETIF_SKB;
1203+
12091204 priv->iTDUsed[dma_idx]++;
12101205
12111206 /* Take ownership */
@@ -1234,13 +1229,10 @@ static int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) · 22 unmodified lines
12341229
12351230 head_td->buff_addr = cpu_to_le32(head_td->pTDInfo->skb_dma);
12361231
1237− if (dma_idx == TYPE_AC0DMA) {
1238− head_td->pTDInfo->byFlags = TD_FLAGS_NETIF_SKB;
1239−
1232+ if (head_td->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB)
12401233 MACvTransmitAC0(priv->PortOffset);
1241− } else {
1234+ else
12421235 MACvTransmit0(priv->PortOffset);
1243− }
12441236
12451237 spin_unlock_irqrestore(&priv->lock, flags);
12461238
@@ -1778,6 +1770,12 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) · 531 unmodified lines
17781770 MACvInitialize(priv->PortOffset);
17791771 MACvReadEtherAddress(priv->PortOffset, priv->abyCurrentNetAddr);
17801772
1773+ /* Get RFType */
1774+ priv->byRFType = SROMbyReadEmbedded(priv->PortOffset, EEP_OFS_RFTYPE);
1775+ priv->byRFType &= RF_MASK;
1776+
1777+ dev_dbg(&pcid->dev, "RF Type = %x\n", priv->byRFType);
1778+
17811779 device_get_options(priv);
17821780 device_set_options(priv);
17831781 /* Mask out the options cannot be set to the chip */
drivers/staging/vt6655/rf.c+1−0
@@ -794,6 +794,7 @@ bool RFbSetPower( · 793 unmodified lines
794794 break;
795795 case RATE_6M:
796796 case RATE_9M:
797+ case RATE_12M:
797798 case RATE_18M:
798799 byPwr = priv->abyOFDMPwrTbl[uCH];
799800 if (priv->byRFType == RF_UW2452)
drivers/staging/vt6656/rf.c+1−0
@@ -640,6 +640,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel) · 639 unmodified lines
640640 break;
641641 case RATE_6M:
642642 case RATE_9M:
643+ case RATE_12M:
643644 case RATE_18M:
644645 case RATE_24M:
645646 case RATE_36M: