~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to drivers/net/wireless/ath/ath9k/ar9003_phy.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Ubuntu: 3.5.0-26.42
  • Date: 2013-03-14 15:21:40 UTC
  • mfrom: (76.1.1 quantal-proposed)
  • Revision ID: package-import@ubuntu.com-20130314152140-tl4mkjmxa038tm3h
Tags: 3.5.0-221.31
* Release Tracking Bug
  - LP: #1153648

[ Paolo Pisati ]

* rebased on Ubuntu-3.5.0-26.42

[ Ubuntu: 3.5.0-26.42 ]

* Release Tracking Bug
  - LP: #1152715
* ubuntu: overlayfs -- fix missmerge of vfs_open changes
  - LP: #1122094, #1147678

Show diffs side-by-side

added added

removed removed

Lines of Context:
532
532
        ath9k_hw_synth_delay(ah, chan, synthDelay);
533
533
}
534
534
 
535
 
static void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
 
535
void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx)
536
536
{
537
 
        switch (rx) {
538
 
        case 0x5:
539
 
                REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
540
 
                            AR_PHY_SWAP_ALT_CHAIN);
541
 
        case 0x3:
542
 
        case 0x1:
543
 
        case 0x2:
544
 
        case 0x7:
545
 
                REG_WRITE(ah, AR_PHY_RX_CHAINMASK, rx);
546
 
                REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, rx);
547
 
                break;
548
 
        default:
549
 
                break;
550
 
        }
551
 
 
552
 
        if ((ah->caps.hw_caps & ATH9K_HW_CAP_APM) && (tx == 0x7))
553
 
                REG_WRITE(ah, AR_SELFGEN_MASK, 0x3);
554
 
        else if (AR_SREV_9462(ah))
555
 
                /* xxx only when MCI support is enabled */
556
 
                REG_WRITE(ah, AR_SELFGEN_MASK, 0x3);
557
 
        else
558
 
                REG_WRITE(ah, AR_SELFGEN_MASK, tx);
559
 
 
560
 
        if (tx == 0x5) {
561
 
                REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
562
 
                            AR_PHY_SWAP_ALT_CHAIN);
563
 
        }
 
537
        if (ah->caps.tx_chainmask == 5 || ah->caps.rx_chainmask == 5)
 
538
                REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP,
 
539
                            AR_PHY_SWAP_ALT_CHAIN);
 
540
 
 
541
        REG_WRITE(ah, AR_PHY_RX_CHAINMASK, rx);
 
542
        REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, rx);
 
543
 
 
544
        if (((ah->caps.hw_caps & ATH9K_HW_CAP_APM) && (tx == 0x7)) ||
 
545
            AR_SREV_9462(ah))
 
546
                tx = 3;
 
547
 
 
548
        REG_WRITE(ah, AR_SELFGEN_MASK, tx);
564
549
}
565
550
 
566
551
/*