Search Linux Wireless

Re: [PATCH] rndis_wlan: set cipher suites for cfg80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting "Holger Schurig" <hs4233@xxxxxxxxxxxxxxxxxxxx>:

+static const u32 rndis_cipher_suites[] = {
+	WLAN_CIPHER_SUITE_WEP40,
+	WLAN_CIPHER_SUITE_WEP104,
+	WLAN_CIPHER_SUITE_TKIP,
+	WLAN_CIPHER_SUITE_CCMP,
+};
+

Okay, this is static, a.k.a. set-in-stone. Then why ...

+	memcpy(priv->cipher_suites, rndis_cipher_suites,
+						sizeof(rndis_cipher_suites));

... copy this to priv?

+	wiphy->cipher_suites = priv->cipher_suites;
+	wiphy->n_cipher_suites = ARRAY_SIZE(rndis_cipher_suites);

Wouldn't

+   wiphy->cipher_suide = rndis_cipher_suites;
+   wiphy->n_cipher_suites = ARRAY_SIZE(rndis_cipher_suites);

do the job?  That way you can drop priv->cipher_suites.


Yes, that works just fine, and first version was that way. Reason is that rndis_wlan should really check device capabilities and set cipher suites depending by theim (so then per device priv->cipher_suite is needed). Current static array is not problem as currently there is only one chip that uses rndis_wlan and array matches its capabilities. priv->channel/rndis_channels and priv->rate/rndis_rates are the same and I plan to add caps checking code later.

-Jussi

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux