From 47d1d39b95b9437c23f10bacc7b2f9344f4230fe Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 26 Jan 2010 00:14:50 +0000 Subject: carl9170: update to 0.9.9.1 SVN-Revision: 19338 --- package/carl9170/patches/110-endian_fixes.patch | 93 ---------------------- package/carl9170/patches/110-ht_default.patch | 11 +++ .../carl9170/patches/120-fix_missing_include.patch | 10 --- package/carl9170/patches/130-ht_default.patch | 11 --- 4 files changed, 11 insertions(+), 114 deletions(-) delete mode 100644 package/carl9170/patches/110-endian_fixes.patch create mode 100644 package/carl9170/patches/110-ht_default.patch delete mode 100644 package/carl9170/patches/120-fix_missing_include.patch delete mode 100644 package/carl9170/patches/130-ht_default.patch (limited to 'package/carl9170/patches') diff --git a/package/carl9170/patches/110-endian_fixes.patch b/package/carl9170/patches/110-endian_fixes.patch deleted file mode 100644 index fa2eb1a55f..0000000000 --- a/package/carl9170/patches/110-endian_fixes.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- a/drivers/net/wireless/ath/carl9170/fw.c -+++ b/drivers/net/wireless/ath/carl9170/fw.c -@@ -39,7 +39,7 @@ const void *ar9170_fw_find_desc(struct a - for_each_hdr(iter, ar->fw_desc) { - if (!memcmp(iter->magic, descid, sizeof(*descid)) && - !CHECK_HDR_VERSION(iter, compatible_revision) && -- (iter->length >= len)) { -+ (le16_to_cpu(iter->length) >= len)) { - ret = (void *)iter; - break; - } -@@ -63,20 +63,22 @@ static int ar9170_fw_verify_descs(struct - end = (void *) head + max_len; - - while (pos < end) { -- if (((unsigned long)pos + pos->length) > (unsigned long)end) -+ int pos_length = le16_to_cpu(pos->length); -+ -+ if (((unsigned long)pos + pos_length) > (unsigned long)end) - return -EMSGSIZE; - -- if (pos->length > max_len) -+ if (pos_length > max_len) - return -EMSGSIZE; - -- if (pos->length < sizeof(struct carl9170_fw_desc_head)) -+ if (pos_length < sizeof(struct carl9170_fw_desc_head)) - return -EINVAL; - - if (!memcmp(pos->magic, last_magic, sizeof(last_magic))) - return 0; - -- pos = (void *)((unsigned long)pos + pos->length); -- max_len -= pos->length; -+ pos = (void *)((unsigned long)pos + pos_length); -+ max_len -= le16_to_cpu(pos->length); - } - - return -EINVAL; -@@ -139,7 +141,7 @@ static int ar9170_fw_check(struct ar9170 - if (SUPP(CARL9170_FW_CRC32_CHECKSUM_TAIL)) { - __le32 crc32; - -- crc32 = crc32_le(~0, data, len - 4); -+ crc32 = cpu_to_le32(crc32_le(~0, data, len - 4)); - if (!memcmp(&crc32, &data[len - 4], 4) == 0) { - dev_err(ar->pdev, "CRC32 checksum mismatch!\n"); - return -EINVAL; ---- a/drivers/net/wireless/ath/carl9170/fwhdr.h -+++ b/drivers/net/wireless/ath/carl9170/fwhdr.h -@@ -196,7 +196,7 @@ struct carl9170_fw_last_desc_v1 { - #define for_each_hdr(desc, fw_desc) \ - for (desc = fw_desc; \ - (memcmp(desc->magic, LAST_MAGIC, 4) && desc->length); \ -- desc = (void *)((unsigned long)desc + desc->length)) -+ desc = (void *)((unsigned long)desc + le16_to_cpu(desc->length))) - - #define CHECK_HDR_VERSION(head, _min_ver) \ - (((head)->cur_ver < _min_ver) || ((head)->min_ver > _min_ver)) \ ---- a/drivers/net/wireless/ath/carl9170/usb.c -+++ b/drivers/net/wireless/ath/carl9170/usb.c -@@ -640,9 +640,10 @@ static int ar9170_usb_check_firmware(str - } - - if ((usb_desc->tx_descs < 16) || -- (usb_desc->tx_frag_len < 64) || (usb_desc->tx_frag_len > 512) || -- (usb_desc->rx_max_frame_len < 1024) || -- (usb_desc->rx_max_frame_len > AR9170_MAX_RX_BUFFER_SIZE)) { -+ (le16_to_cpu(usb_desc->tx_frag_len) < 64) || -+ (le16_to_cpu(usb_desc->tx_frag_len) > 512) || -+ (le16_to_cpu(usb_desc->rx_max_frame_len) < 1024) || -+ (le16_to_cpu(usb_desc->rx_max_frame_len) > AR9170_MAX_RX_BUFFER_SIZE)) { - dev_err(&aru->udev->dev, "usb firmware has obvious signs of " - "malicious tampering.\n"); - err = -EINVAL; -@@ -650,14 +651,14 @@ static int ar9170_usb_check_firmware(str - } - - if (SUPP(CARL9170_FW_USB_MINIBOOT)) -- aru->fw_offset = usb_desc->miniboot_size; -+ aru->fw_offset = le16_to_cpu(usb_desc->miniboot_size); - else - aru->fw_offset = 0; - -- aru->rx_size = usb_desc->rx_max_frame_len; -+ aru->rx_size = le16_to_cpu(usb_desc->rx_max_frame_len); - aru->common.mem_blocks = usb_desc->tx_descs; - atomic_set(&aru->common.mem_free_blocks, usb_desc->tx_descs); -- aru->common.mem_block_size = usb_desc->tx_frag_len; -+ aru->common.mem_block_size = le16_to_cpu(usb_desc->tx_frag_len); - return 0; - - fail: diff --git a/package/carl9170/patches/110-ht_default.patch b/package/carl9170/patches/110-ht_default.patch new file mode 100644 index 0000000000..aa629497c6 --- /dev/null +++ b/package/carl9170/patches/110-ht_default.patch @@ -0,0 +1,11 @@ +--- a/drivers/net/wireless/ath/carl9170/main.c ++++ b/drivers/net/wireless/ath/carl9170/main.c +@@ -50,7 +50,7 @@ static int modparam_nohwcrypt; + module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); + MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); + +-int modparam_ht; ++int modparam_ht = 1; + module_param_named(ht, modparam_ht, bool, S_IRUGO); + MODULE_PARM_DESC(ht, "enable MPDU aggregation."); + diff --git a/package/carl9170/patches/120-fix_missing_include.patch b/package/carl9170/patches/120-fix_missing_include.patch deleted file mode 100644 index 02a7a87cc2..0000000000 --- a/package/carl9170/patches/120-fix_missing_include.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/drivers/net/wireless/ath/carl9170/debug.c -+++ b/drivers/net/wireless/ath/carl9170/debug.c -@@ -38,6 +38,7 @@ - */ - - #include -+#include - #include "carl9170.h" - #include "usb.h" - #include "cmd.h" diff --git a/package/carl9170/patches/130-ht_default.patch b/package/carl9170/patches/130-ht_default.patch deleted file mode 100644 index aa629497c6..0000000000 --- a/package/carl9170/patches/130-ht_default.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/drivers/net/wireless/ath/carl9170/main.c -+++ b/drivers/net/wireless/ath/carl9170/main.c -@@ -50,7 +50,7 @@ static int modparam_nohwcrypt; - module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO); - MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption."); - --int modparam_ht; -+int modparam_ht = 1; - module_param_named(ht, modparam_ht, bool, S_IRUGO); - MODULE_PARM_DESC(ht, "enable MPDU aggregation."); - -- cgit v1.2.3