Re: [OpenWrt-Devel] [PATCH RFC] broadcom-wl: use CCMP by default for WPA (version 1)
On 4 December 2014 at 12:14, Felix Fietkau wrote: > On 2014-12-04 11:28, Rafał Miłecki wrote: >> On 18 November 2014 at 12:19, Rafał Miłecki wrote: >>> I can see multiple files: >>> /sbin/wifi >>> /lib/wifi/mac80211.sh >>> /lib/netifd/wireless/mac80211.sh >>> /lib/netifd/hostapd.sh >>> but they mostly don't contain any comments. >>> >>> I'm not sure how much it's worth to list unclear parts of that. >>> >>> It's confusing to have /lib/netifd/ and /lib/wifi/. It's confusing to >>> have two APIs (inconsistent callbacks). I can't understand why even >>> for mac80211.sh we keep detecting code in /lib/wifi/. There isn't >>> anything documented in the /lib/netifd/netifd-wireless.sh. I have no >>> idea how netifd <-> scripts communication works. What is handled in >>> scripts and what in netifd? >> >> You say that /lib/wifi/*sh is legacy layer. I can understand we need >> it for Broadcom or similar. But what's the point of having mac80211 >> there? >> >> Also why do we have something like /lib/netifd/hostapd.sh? Isn't >> wireless stuff supposed to be in /lib/netifd/wireless/? > /lib/netifd/wireless/*.sh contains handler scripts executed by netifd > directly. /lib/netifd/hostapd.sh is just an include used by > /lib/netifd/wireless/mac80211.sh. > The only reason that /lib/wifi/mac80211.sh is still there is that netifd > doesn't handle detecting devices and generating default configurations > for them. I have removed the actual device setup logic from it a long > time ago. > John is currently reworking device detection (including for wifi) - once > that's done, /lib/wifi/mac80211.sh can be removed. Thanks for your help! One more question: what about file pointed by Hauke: package/network/services/hostapd/files/hostapd.sh is this ever used? Also: is my patch correct? -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH RFC] broadcom-wl: use CCMP by default for WPA (version 1)
On 2014-12-04 11:28, Rafał Miłecki wrote: > On 18 November 2014 at 12:19, Rafał Miłecki wrote: >> I can see multiple files: >> /sbin/wifi >> /lib/wifi/mac80211.sh >> /lib/netifd/wireless/mac80211.sh >> /lib/netifd/hostapd.sh >> but they mostly don't contain any comments. >> >> I'm not sure how much it's worth to list unclear parts of that. >> >> It's confusing to have /lib/netifd/ and /lib/wifi/. It's confusing to >> have two APIs (inconsistent callbacks). I can't understand why even >> for mac80211.sh we keep detecting code in /lib/wifi/. There isn't >> anything documented in the /lib/netifd/netifd-wireless.sh. I have no >> idea how netifd <-> scripts communication works. What is handled in >> scripts and what in netifd? > > You say that /lib/wifi/*sh is legacy layer. I can understand we need > it for Broadcom or similar. But what's the point of having mac80211 > there? > > Also why do we have something like /lib/netifd/hostapd.sh? Isn't > wireless stuff supposed to be in /lib/netifd/wireless/? /lib/netifd/wireless/*.sh contains handler scripts executed by netifd directly. /lib/netifd/hostapd.sh is just an include used by /lib/netifd/wireless/mac80211.sh. The only reason that /lib/wifi/mac80211.sh is still there is that netifd doesn't handle detecting devices and generating default configurations for them. I have removed the actual device setup logic from it a long time ago. John is currently reworking device detection (including for wifi) - once that's done, /lib/wifi/mac80211.sh can be removed. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH RFC] broadcom-wl: use CCMP by default for WPA (version 1)
On 3 December 2014 at 09:27, John Crispin wrote: > On 03/12/2014 07:10, Rafał Miłecki wrote: >> Honestly, I don't know what is this file for. I don't understand >> netifd & wireless well at all. I asked for help in the Request for >> any netifd wireless documentation e-mail thread, but ppl who know >> /things/ ignored me. > > can you narrow down your questions to specific things you don't > understand ? a global "i don't understand it" is hard to resolve. > > in general there are 2 files > > * /lib/wifi/*.sh - the legacy layer used for probing the hw during > "wifi detect" > * /lib/netfid/wireless/*.sh the new netifd wifi layer > > which of the 2 is causing /problems/ There are some questions I posted in the mentioned e-mail: On 18 November 2014 at 12:19, Rafał Miłecki wrote: > I can see multiple files: > /sbin/wifi > /lib/wifi/mac80211.sh > /lib/netifd/wireless/mac80211.sh > /lib/netifd/hostapd.sh > but they mostly don't contain any comments. > > I'm not sure how much it's worth to list unclear parts of that. > > It's confusing to have /lib/netifd/ and /lib/wifi/. It's confusing to > have two APIs (inconsistent callbacks). I can't understand why even > for mac80211.sh we keep detecting code in /lib/wifi/. There isn't > anything documented in the /lib/netifd/netifd-wireless.sh. I have no > idea how netifd <-> scripts communication works. What is handled in > scripts and what in netifd? You say that /lib/wifi/*sh is legacy layer. I can understand we need it for Broadcom or similar. But what's the point of having mac80211 there? Also why do we have something like /lib/netifd/hostapd.sh? Isn't wireless stuff supposed to be in /lib/netifd/wireless/? -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH RFC] broadcom-wl: use CCMP by default for WPA (version 1)
On 03/12/2014 07:10, Rafał Miłecki wrote: > Honestly, I don't know what is this file for. I don't understand > netifd & wireless well at all. I asked for help in the Request for > any netifd wireless documentation e-mail thread, but ppl who know > /things/ ignored me. can you narrow down your questions to specific things you don't understand ? a global "i don't understand it" is hard to resolve. in general there are 2 files * /lib/wifi/*.sh - the legacy layer used for probing the hw during "wifi detect" * /lib/netfid/wireless/*.sh the new netifd wifi layer which of the 2 is causing /problems/ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH RFC] broadcom-wl: use CCMP by default for WPA (version 1)
On 2 December 2014 at 23:48, Hauke Mehrtens wrote: > On 12/02/2014 08:39 PM, Rafał Miłecki wrote: >> It follows OpenWrt's global logic in netifd-wireless.sh. We should use >> CCMP unless TKIP was really requested. >> >> Signed-off-by: Rafał Miłecki >> --- >> package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > I think broadcom-wl has the same behavior as hostapd in this part. In > the hostapd file in package/network/services/hostapd/files/hostapd.sh it > also uses wpa1 + tkip as default. Honestly, I don't know what is this file for. I don't understand netifd & wireless well at all. I asked for help in the Request for any netifd wireless documentation e-mail thread, but ppl who know /things/ ignored me. In my case /var/run/hostapd-phy0.conf is getting generated by the netifd-wireless.sh from the following place: http://git.openwrt.org/?p=project/netifd.git;a=blob;f=scripts/netifd-wireless.sh;hb=HEAD In the above you can see that "psk" uses CCMP by default. This is how Felix decided to implement it. Felix: could you help me/us this time, please? Could you describe how this hostapd config helpers work? Which of them are used and which are not? > How would you explicitly set tkip only with your change? psk+tkip ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH RFC] broadcom-wl: use CCMP by default for WPA (version 1)
On 12/02/2014 08:39 PM, Rafał Miłecki wrote: > It follows OpenWrt's global logic in netifd-wireless.sh. We should use > CCMP unless TKIP was really requested. > > Signed-off-by: Rafał Miłecki > --- > package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I think broadcom-wl has the same behavior as hostapd in this part. In the hostapd file in package/network/services/hostapd/files/hostapd.sh it also uses wpa1 + tkip as default. How would you explicitly set tkip only with your change? > diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh > b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh > index 65179a5..7f38464 100644 > --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh > +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh > @@ -292,7 +292,7 @@ enable_broadcom() { > case "$enc" in > *mixed*|*psk+psk2*) auth=132; wsec=6;; > *psk2*) auth=128; wsec=4;; > - *) auth=4; wsec=2;; > + *) auth=4; wsec=4;; > esac > > # cipher override > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH RFC] broadcom-wl: use CCMP by default for WPA (version 1)
It follows OpenWrt's global logic in netifd-wireless.sh. We should use CCMP unless TKIP was really requested. Signed-off-by: Rafał Miłecki --- package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh index 65179a5..7f38464 100644 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh @@ -292,7 +292,7 @@ enable_broadcom() { case "$enc" in *mixed*|*psk+psk2*) auth=132; wsec=6;; *psk2*) auth=128; wsec=4;; - *) auth=4; wsec=2;; + *) auth=4; wsec=4;; esac # cipher override -- 1.8.4.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel