aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2013-03-15 14:14:44 -0700
committerDmitry Shmidt <dimitrysh@google.com>2013-03-18 12:55:26 -0700
commit700a137ab366edc72e371da68ba187b4717ee660 (patch)
tree71a9c7626cdd29d8260565304a9b92e14b6b04e0 /src/tls
parent2f023193a0fd630eb82ce6381b80911ad5a3462f (diff)
downloadandroid_external_wpa_supplicant_8-700a137ab366edc72e371da68ba187b4717ee660.tar.gz
android_external_wpa_supplicant_8-700a137ab366edc72e371da68ba187b4717ee660.tar.bz2
android_external_wpa_supplicant_8-700a137ab366edc72e371da68ba187b4717ee660.zip
Accumulative patch from commit 565110cd554801fa301c55010b3e9e14f43d7973
nl80211: Include interface name in more debug prints Convert WPS NFC python scripts from using wpactrl to wpaspy wpa_supplicant: Fix lookup of cached PMKSA Add capability flag for IBSS and add get_capability modes hostapd: Fix client reassociation after disconnect due to ACK failure Fix build with CONFIG_NO_CONFIG_BLOBS Fix build without CONFIG_CTRL_IFACE or CONFIG_NO_STDOUT_DEBUG libtommath: Avoid a compiler warning on unused variable libtommath: Condition fast_s_mp_mul_digs() on LTM_FAST P2P: Remove persistent group peer if it rejects invitation P2P: Allow shared interface channel preference to be ignored P2P: Fix shared frequency preference for concurrent operations P2P: Use best-overall channel in p2p_reselect_channel() P2P: Allow all channels for multi-channel concurrency (no negotiation) TDLS: Disable link to existing peer with lower address Fix compiler warning when CONFIG_IEEE80211R is not included WPS NFC: Fix build without CONFIG_WPS_ER FT: Add support for IEEE 802.11r with driver-based SME Change-Id: I1d5ced870c33d5cb73ecc6f04e272a3cf50f344a Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'src/tls')
-rw-r--r--src/tls/libtommath.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tls/libtommath.c b/src/tls/libtommath.c
index 741b442c..3fb8fbed 100644
--- a/src/tls/libtommath.c
+++ b/src/tls/libtommath.c
@@ -42,6 +42,9 @@
/* Include faster sqr at the cost of about 0.5 kB in code */
#define BN_FAST_S_MP_SQR_C
+/* About 0.25 kB of code, but ~1.7kB of stack space! */
+#define BN_FAST_S_MP_MUL_DIGS_C
+
#else /* LTM_FAST */
#define BN_MP_DIV_SMALL
@@ -139,7 +142,9 @@ static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
static int s_mp_sqr(mp_int * a, mp_int * b);
static int s_mp_mul_high_digs(mp_int * a, mp_int * b, mp_int * c, int digs);
+#ifdef BN_FAST_S_MP_MUL_DIGS_C
static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs);
+#endif
#ifdef BN_MP_INIT_MULTI_C
static int mp_init_multi(mp_int *mp, ...);
@@ -671,6 +676,9 @@ static int mp_exptmod (mp_int * G, mp_int * X, mp_int * P, mp_int * Y)
#ifdef BN_MP_EXPTMOD_FAST_C
}
#endif
+ if (dr == 0) {
+ /* avoid compiler warnings about possibly unused variable */
+ }
}
@@ -2339,12 +2347,14 @@ static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
mp_word r;
mp_digit tmpx, *tmpt, *tmpy;
+#ifdef BN_FAST_S_MP_MUL_DIGS_C
/* can we use the fast multiplier? */
if (((digs) < MP_WARRAY) &&
MIN (a->used, b->used) <
(1 << ((CHAR_BIT * sizeof (mp_word)) - (2 * DIGIT_BIT)))) {
return fast_s_mp_mul_digs (a, b, c, digs);
}
+#endif
if ((res = mp_init_size (&t, digs)) != MP_OKAY) {
return res;
@@ -2397,6 +2407,7 @@ static int s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
}
+#ifdef BN_FAST_S_MP_MUL_DIGS_C
/* Fast (comba) multiplier
*
* This is the fast column-array [comba] multiplier. It is
@@ -2482,6 +2493,7 @@ static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
mp_clamp (c);
return MP_OKAY;
}
+#endif /* BN_FAST_S_MP_MUL_DIGS_C */
/* init an mp_init for a given size */