forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from qosmio/qualcommax-6.x-nss-wifi
sync 8/5 2
- Loading branch information
Showing
187 changed files
with
40,790 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
package/kernel/ath10k-ct/patches/999-003-ath10k-add-nss-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- a/ath10k-6.4/mac.c | ||
+++ b/ath10k-6.4/mac.c | ||
@@ -6362,13 +6362,13 @@ | ||
ath10k_dbg(ar, ATH10K_DBG_MAC, "mac set txbf conf, value: 0x%x\n", | ||
value); | ||
return ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, | ||
ar->wmi.vdev_param->txbf, value); | ||
} | ||
|
||
-static void ath10k_update_vif_offload(struct ieee80211_hw *hw, | ||
+static int ath10k_update_vif_offload(struct ieee80211_hw *hw, | ||
struct ieee80211_vif *vif) | ||
{ | ||
struct ath10k_vif *arvif = (void *)vif->drv_priv; | ||
struct ath10k *ar = hw->priv; | ||
u32 vdev_param; | ||
int ret; | ||
@@ -6384,14 +6384,16 @@ | ||
ATH10K_HW_TXRX_NATIVE_WIFI); | ||
/* 10.X firmware does not support this VDEV parameter. Do not warn */ | ||
if (ret && ret != -EOPNOTSUPP) { | ||
ath10k_warn(ar, "failed to set vdev %i TX encapsulation: %d\n", | ||
arvif->vdev_id, ret); | ||
} | ||
+ | ||
+ return ret; | ||
} | ||
|
||
/* | ||
* TODO: | ||
* Figure out how to handle WMI_VDEV_SUBTYPE_P2P_DEVICE, | ||
* because we will send mgmt frames without CCK. This requirement |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
package/kernel/cryptodev-linux/patches/0005-add-qca-nss.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- a/ioctl.c | ||
+++ b/ioctl.c | ||
@@ -829,29 +829,37 @@ static inline void tfm_info_to_alg_info( | ||
"%s", crypto_tfm_alg_driver_name(tfm)); | ||
} | ||
|
||
-#ifndef CRYPTO_ALG_KERN_DRIVER_ONLY | ||
+#if defined(QCANSS) || defined(QCA) || defined(MT7621) || defined(MT7622) || defined(LANTIQ) || defined(BCM675X) || defined(BCM49XX) || defined(MT798X) | ||
static unsigned int is_known_accelerated(struct crypto_tfm *tfm) | ||
{ | ||
const char *name = crypto_tfm_alg_driver_name(tfm); | ||
|
||
if (name == NULL) | ||
- return 1; /* assume accelerated */ | ||
+ return 0; | ||
|
||
/* look for known crypto engine names */ | ||
- if (strstr(name, "-talitos") || | ||
- !strncmp(name, "mv-", 3) || | ||
- !strncmp(name, "atmel-", 6) || | ||
- strstr(name, "geode") || | ||
- strstr(name, "hifn") || | ||
- strstr(name, "-ixp4xx") || | ||
- strstr(name, "-omap") || | ||
- strstr(name, "-picoxcell") || | ||
- strstr(name, "-s5p") || | ||
- strstr(name, "-ppc4xx") || | ||
- strstr(name, "-caam") || | ||
- strstr(name, "-n2")) | ||
+#if defined(QCANSS) | ||
+ if (!strncmp(name, "nss-", 4)) | ||
return 1; | ||
- | ||
+#elif defined(QCA) | ||
+ if (!strncmp(name, "qcrypto", 7)) | ||
+ return 1; | ||
+#elif defined(MT7621) | ||
+ if (strstr(name, "eip93")) | ||
+ return 1; | ||
+#elif defined(MT7622) | ||
+ if (strstr(name, "mtk")) | ||
+ return 1; | ||
+#elif defined(MT798X) | ||
+ if (strstr(name, "safexcel-")) | ||
+ return 1; | ||
+#elif defined(LANTIQ) | ||
+ if (strstr(name, "ltq-crypto")) | ||
+ return 1; | ||
+#elif defined(BCM675X) || defined(BCM49XX) | ||
+ if (strstr(name, "-iproc")) | ||
+ return 1; | ||
+#endif | ||
return 0; | ||
} | ||
#endif | ||
@@ -876,22 +884,22 @@ static int get_session_info(struct fcryp | ||
else | ||
tfm = crypto_aead_tfm(ses_ptr->cdata.async.as); | ||
tfm_info_to_alg_info(&siop->cipher_info, tfm); | ||
-#ifdef CRYPTO_ALG_KERN_DRIVER_ONLY | ||
- if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY) | ||
+#if defined(QCANSS) || defined(QCA) || defined(MT7621) || defined(MT7622) || defined(LANTIQ) || defined(BCM675X) || defined(BCM49XX) || defined(MT798X) | ||
+ if (is_known_accelerated(tfm)) | ||
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY; | ||
#else | ||
- if (is_known_accelerated(tfm)) | ||
+ if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY) | ||
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY; | ||
#endif | ||
} | ||
if (ses_ptr->hdata.init) { | ||
tfm = crypto_ahash_tfm(ses_ptr->hdata.async.s); | ||
tfm_info_to_alg_info(&siop->hash_info, tfm); | ||
-#ifdef CRYPTO_ALG_KERN_DRIVER_ONLY | ||
- if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY) | ||
+#if defined(QCANSS) || defined(QCA) || defined(MT7621) || defined(MT7622) || defined(LANTIQ) || defined(BCM675X) || defined(BCM49XX) || defined(MT798X) | ||
+ if (is_known_accelerated(tfm)) | ||
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY; | ||
#else | ||
- if (is_known_accelerated(tfm)) | ||
+ if (tfm->__crt_alg->cra_flags & CRYPTO_ALG_KERN_DRIVER_ONLY) | ||
siop->flags |= SIOP_FLAG_KERNEL_DRIVER_ONLY; | ||
#endif | ||
} | ||
--- a/main.c | ||
+++ b/main.c | ||
@@ -168,6 +168,12 @@ __crypto_run_zc(struct csession *ses_ptr | ||
struct crypt_op *cop = &kcop->cop; | ||
int ret = 0; | ||
|
||
+#if defined(QCANSS) | ||
+//openssl bug!!! | ||
+ if (unlikely(cop->src != cop->dst)) { | ||
+ return __crypto_run_std(ses_ptr, cop); | ||
+ } | ||
+#endif | ||
ret = get_userbuf(ses_ptr, cop->src, cop->len, cop->dst, cop->len, | ||
kcop->task, kcop->mm, &src_sg, &dst_sg); | ||
if (unlikely(ret)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.