diff options
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_chip.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_chip.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c index 99e5b03b3f51..0acb5c345734 100644 --- a/drivers/net/wireless/zd1211rw/zd_chip.c +++ b/drivers/net/wireless/zd1211rw/zd_chip.c | |||
@@ -771,10 +771,10 @@ static int zd1211b_hw_init_hmac(struct zd_chip *chip) | |||
771 | { | 771 | { |
772 | static const struct zd_ioreq32 ioreqs[] = { | 772 | static const struct zd_ioreq32 ioreqs[] = { |
773 | { CR_ZD1211B_RETRY_MAX, 0x02020202 }, | 773 | { CR_ZD1211B_RETRY_MAX, 0x02020202 }, |
774 | { CR_ZD1211B_TX_PWR_CTL4, 0x007f003f }, | 774 | { CR_ZD1211B_CWIN_MAX_MIN_AC0, 0x007f003f }, |
775 | { CR_ZD1211B_TX_PWR_CTL3, 0x007f003f }, | 775 | { CR_ZD1211B_CWIN_MAX_MIN_AC1, 0x007f003f }, |
776 | { CR_ZD1211B_TX_PWR_CTL2, 0x003f001f }, | 776 | { CR_ZD1211B_CWIN_MAX_MIN_AC2, 0x003f001f }, |
777 | { CR_ZD1211B_TX_PWR_CTL1, 0x001f000f }, | 777 | { CR_ZD1211B_CWIN_MAX_MIN_AC3, 0x001f000f }, |
778 | { CR_ZD1211B_AIFS_CTL1, 0x00280028 }, | 778 | { CR_ZD1211B_AIFS_CTL1, 0x00280028 }, |
779 | { CR_ZD1211B_AIFS_CTL2, 0x008C003C }, | 779 | { CR_ZD1211B_AIFS_CTL2, 0x008C003C }, |
780 | { CR_ZD1211B_TXOP, 0x01800824 }, | 780 | { CR_ZD1211B_TXOP, 0x01800824 }, |
@@ -809,6 +809,7 @@ static int hw_init_hmac(struct zd_chip *chip) | |||
809 | { CR_AFTER_PNP, 0x1 }, | 809 | { CR_AFTER_PNP, 0x1 }, |
810 | { CR_WEP_PROTECT, 0x114 }, | 810 | { CR_WEP_PROTECT, 0x114 }, |
811 | { CR_IFS_VALUE, IFS_VALUE_DEFAULT }, | 811 | { CR_IFS_VALUE, IFS_VALUE_DEFAULT }, |
812 | { CR_CAM_MODE, MODE_AP_WDS}, | ||
812 | }; | 813 | }; |
813 | 814 | ||
814 | ZD_ASSERT(mutex_is_locked(&chip->mutex)); | 815 | ZD_ASSERT(mutex_is_locked(&chip->mutex)); |
@@ -986,7 +987,7 @@ static int print_fw_version(struct zd_chip *chip) | |||
986 | return 0; | 987 | return 0; |
987 | } | 988 | } |
988 | 989 | ||
989 | static int set_mandatory_rates(struct zd_chip *chip, int mode) | 990 | static int set_mandatory_rates(struct zd_chip *chip, int gmode) |
990 | { | 991 | { |
991 | u32 rates; | 992 | u32 rates; |
992 | ZD_ASSERT(mutex_is_locked(&chip->mutex)); | 993 | ZD_ASSERT(mutex_is_locked(&chip->mutex)); |
@@ -994,17 +995,12 @@ static int set_mandatory_rates(struct zd_chip *chip, int mode) | |||
994 | * that the device is supporting. Until further notice we should try | 995 | * that the device is supporting. Until further notice we should try |
995 | * to support 802.11g also for full speed USB. | 996 | * to support 802.11g also for full speed USB. |
996 | */ | 997 | */ |
997 | switch (mode) { | 998 | if (!gmode) |
998 | case MODE_IEEE80211B: | ||
999 | rates = CR_RATE_1M|CR_RATE_2M|CR_RATE_5_5M|CR_RATE_11M; | 999 | rates = CR_RATE_1M|CR_RATE_2M|CR_RATE_5_5M|CR_RATE_11M; |
1000 | break; | 1000 | else |
1001 | case MODE_IEEE80211G: | ||
1002 | rates = CR_RATE_1M|CR_RATE_2M|CR_RATE_5_5M|CR_RATE_11M| | 1001 | rates = CR_RATE_1M|CR_RATE_2M|CR_RATE_5_5M|CR_RATE_11M| |
1003 | CR_RATE_6M|CR_RATE_12M|CR_RATE_24M; | 1002 | CR_RATE_6M|CR_RATE_12M|CR_RATE_24M; |
1004 | break; | 1003 | |
1005 | default: | ||
1006 | return -EINVAL; | ||
1007 | } | ||
1008 | return zd_iowrite32_locked(chip, rates, CR_MANDATORY_RATE_TBL); | 1004 | return zd_iowrite32_locked(chip, rates, CR_MANDATORY_RATE_TBL); |
1009 | } | 1005 | } |
1010 | 1006 | ||
@@ -1108,7 +1104,7 @@ int zd_chip_init_hw(struct zd_chip *chip) | |||
1108 | * It might be discussed, whether we should suppport pure b mode for | 1104 | * It might be discussed, whether we should suppport pure b mode for |
1109 | * full speed USB. | 1105 | * full speed USB. |
1110 | */ | 1106 | */ |
1111 | r = set_mandatory_rates(chip, MODE_IEEE80211G); | 1107 | r = set_mandatory_rates(chip, 1); |
1112 | if (r) | 1108 | if (r) |
1113 | goto out; | 1109 | goto out; |
1114 | /* Disabling interrupts is certainly a smart thing here. | 1110 | /* Disabling interrupts is certainly a smart thing here. |