[RFC] Implementing nohwcrypt in wcn36xx

Bob Copeland me at bobcopeland.com
Fri Apr 4 14:32:12 EDT 2014


On Fri, Mar 28, 2014 at 01:38:59PM +0000, Eugene Krasnikov wrote:
> Are you sure you do not set encrypt_type in config_sta command? I am
> surprised that FW will not pass frames if frame is encrypted but
> wcn36xx  is not configure with keys.

Yes, with, nohwcrypt it was bailing out of set_key for all keys
with -EOPNOTSUPP, without setting either vif->encrypt_type or
sta_priv->is_data_encrypted.

I also tried this as an experiment:

		if (sta && (IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) {
+#if 0
			sta_priv->is_data_encrypted = true;
			/* Reconfigure bss with encrypt_type */
			if (NL80211_IFTYPE_STATION == vif->type)
				wcn36xx_smd_config_bss(wcn,
						       vif,
						       sta,
						       sta->addr,
						       true);
+#endif
			wcn36xx_smd_set_stakey(wcn,
				vif_priv->encrypt_type,
				key_conf->keyidx,
				key_conf->keylen,
				key,
				get_sta_index(vif, sta_priv));
+
+           return -EOPNOTSUPP;


That is: install the pairwise sta key into the hardware, but
do not set sta_priv->is_data_encrypted (so HW will not encrypt
TX), but also pretend for the sake of mac80211 that we couldn't
install the key.  (I do set vif_priv->encrypt_type in this case,
and allow group keys to use HW encryption.)

So mac80211 encrypts things fine, hardware doesn't encrypt, and
we receive encrypted frames just fine (due to having key in the
hardware).  So I'm not sure where to go from here; obviously my
goal is to not require the key in hardware for RX, but seems
the firmware doesn't want to pass up these frames in that case.

-- 
Bob Copeland %% www.bobcopeland.com



More information about the wcn36xx mailing list