Re: Slow wifi

2016-11-11 Thread Marko Cupać
On Thu, 10 Nov 2016 15:22:45 -0500
Donald Allen  wrote:

> Needing the machine, I had no choice but to install Linux
> (FreeBSD doesn't seem to know about iwm yet).

>From FreeBSD 11.0 release notes:

The iwm(4) driver has been imported from OpenBSD, providing support for
Intel® 3160/7260/7265 wireless chipsets. [r286441]

Regards,
--
Before enlightenment - chop wood, draw water.
After  enlightenment - chop wood, draw water.

Marko Cupać
https://www.mimar.rs/



Re: Slow wifi

2016-11-10 Thread Donald Allen
On Thu, Nov 10, 2016 at 4:43 PM, George Pediaditis <
g.pediaditis1...@gmail.com> wrote:

> thanks for the reply. I will try it next week when i have more time.
> If that doesnt work im thinking if its possible to go from current
> back to stable. If i try current and i have problems. It looks
> possible but it isnt in FAQ
> https://www.openbsd.org/faq/faq5.html#Flavors
> im wondering if im missing something.
>

You are. As was recently pointed out in another thread by Nick Holland, you
can't go backwards in time-of-release except by re-installation. But you
can back up and restore. I've used Clonezilla on OpenBSD systems and it
works well for bare-metal restores.

>
> On Thu, Nov 10, 2016 at 10:52 PM, Stefan Sperling  wrote:
> > On Thu, Nov 10, 2016 at 10:24:50PM +0200, George Pediaditis wrote:
> >> i currently use stable. I updated my system a week ago. How stable is
> current?
> >> I use my laptop for programming (java) and im a bit skeptical about
> >> running current.
> >
> > Generally, -current is fine. But if you don't follow our development
> > process at least a bit you might upgrade at a bad moment and run into
> > surprises. Most issues will fix themselves after a few days and we're
> > always welcoming reports from users running -current since that really
> > helps us make the next release better.
> >
> > I have spent many hours making many changes since 6.0 which fixed
> > several issues in the iwm driver and the wireless framework.
> > All these fixes will of course ship in 6.1.
> > I'm sorry but this kind of problem is not something we officially
> > backport fixes to -stable for because it just takes too much time
> > on top of all the time already spent on development for -current.
> >
> > That said, I'll include one fix I made below. I don't know if it
> > provides a huge improvement in isolation but if you really want
> > to stick with -stable then this patch is worth a shot. I know that
> > it compiles but I haven't run this on a 6.0 system myself.
> >
> > Index: if_iwm.c
> > ===
> > RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
> > retrieving revision 1.132
> > retrieving revision 1.133
> > diff -u -p -r1.132 -r1.133
> > --- if_iwm.c12 Sep 2016 10:18:26 -  1.132
> > +++ if_iwm.c21 Sep 2016 12:56:43 -  1.133
> > @@ -4896,6 +4896,7 @@ iwm_ack_rates(struct iwm_softc *sc, stru
> >  int *ofdm_rates)
> >  {
> > struct ieee80211_node *ni = &in->in_ni;
> > +   struct ieee80211_rateset *rs = &ni->ni_rates;
> > int lowest_present_ofdm = 100;
> > int lowest_present_cck = 100;
> > uint8_t cck = 0;
> > @@ -4904,15 +4905,19 @@ iwm_ack_rates(struct iwm_softc *sc, stru
> >
> > if (ni->ni_chan == IEEE80211_CHAN_ANYC ||
> > IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) {
> > -   for (i = 0; i <= IWM_LAST_CCK_RATE; i++) {
> > +   for (i = 0; i < MIN(IWM_FIRST_OFDM_RATE, rs->rs_nrates);
> i++) {
> > +   if ((rs->rs_rates[i] & IEEE80211_RATE_BASIC) ==
> 0)
> > +   continue;
> > cck |= (1 << i);
> > if (lowest_present_cck > i)
> > lowest_present_cck = i;
> > }
> > }
> > -   for (i = IWM_FIRST_OFDM_RATE; i <= IWM_LAST_NON_HT_RATE; i++) {
> > -   int adj = i - IWM_FIRST_OFDM_RATE;
> > -   ofdm |= (1 << adj);
> > +   for (i = IWM_FIRST_OFDM_RATE;
> > +   i <= MIN(IWM_LAST_NON_HT_RATE, rs->rs_nrates - 1); i++) {
> > +   if ((rs->rs_rates[i] & IEEE80211_RATE_BASIC) == 0)
> > +   continue;
> > +   ofdm |= (1 << (i - IWM_FIRST_OFDM_RATE));
> > if (lowest_present_ofdm > i)
> > lowest_present_ofdm = i;
> > }



Re: Slow wifi

2016-11-10 Thread Thuban
* George Pediaditis  le [10-11-2016 23:43:20
+0200]:
> thanks for the reply. I will try it next week when i have more time.
> If that doesnt work im thinking if its possible to go from current
> back to stable. If i try current and i have problems. It looks
> possible but it isnt in FAQ
> https://www.openbsd.org/faq/faq5.html#Flavors
> im wondering if im missing something.

No, I don't think that's possible. It's safer to do a clean install of
-release .

--
/Thuban/

[demime 1.01d removed an attachment of type application/pgp-signature which had 
a name of signature.asc]



Re: Slow wifi

2016-11-10 Thread George Pediaditis
thanks for the reply. I will try it next week when i have more time.
If that doesnt work im thinking if its possible to go from current
back to stable. If i try current and i have problems. It looks
possible but it isnt in FAQ
https://www.openbsd.org/faq/faq5.html#Flavors
im wondering if im missing something.

On Thu, Nov 10, 2016 at 10:52 PM, Stefan Sperling  wrote:
> On Thu, Nov 10, 2016 at 10:24:50PM +0200, George Pediaditis wrote:
>> i currently use stable. I updated my system a week ago. How stable is 
>> current?
>> I use my laptop for programming (java) and im a bit skeptical about
>> running current.
>
> Generally, -current is fine. But if you don't follow our development
> process at least a bit you might upgrade at a bad moment and run into
> surprises. Most issues will fix themselves after a few days and we're
> always welcoming reports from users running -current since that really
> helps us make the next release better.
>
> I have spent many hours making many changes since 6.0 which fixed
> several issues in the iwm driver and the wireless framework.
> All these fixes will of course ship in 6.1.
> I'm sorry but this kind of problem is not something we officially
> backport fixes to -stable for because it just takes too much time
> on top of all the time already spent on development for -current.
>
> That said, I'll include one fix I made below. I don't know if it
> provides a huge improvement in isolation but if you really want
> to stick with -stable then this patch is worth a shot. I know that
> it compiles but I haven't run this on a 6.0 system myself.
>
> Index: if_iwm.c
> ===
> RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
> retrieving revision 1.132
> retrieving revision 1.133
> diff -u -p -r1.132 -r1.133
> --- if_iwm.c12 Sep 2016 10:18:26 -  1.132
> +++ if_iwm.c21 Sep 2016 12:56:43 -  1.133
> @@ -4896,6 +4896,7 @@ iwm_ack_rates(struct iwm_softc *sc, stru
>  int *ofdm_rates)
>  {
> struct ieee80211_node *ni = &in->in_ni;
> +   struct ieee80211_rateset *rs = &ni->ni_rates;
> int lowest_present_ofdm = 100;
> int lowest_present_cck = 100;
> uint8_t cck = 0;
> @@ -4904,15 +4905,19 @@ iwm_ack_rates(struct iwm_softc *sc, stru
>
> if (ni->ni_chan == IEEE80211_CHAN_ANYC ||
> IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) {
> -   for (i = 0; i <= IWM_LAST_CCK_RATE; i++) {
> +   for (i = 0; i < MIN(IWM_FIRST_OFDM_RATE, rs->rs_nrates); i++) 
> {
> +   if ((rs->rs_rates[i] & IEEE80211_RATE_BASIC) == 0)
> +   continue;
> cck |= (1 << i);
> if (lowest_present_cck > i)
> lowest_present_cck = i;
> }
> }
> -   for (i = IWM_FIRST_OFDM_RATE; i <= IWM_LAST_NON_HT_RATE; i++) {
> -   int adj = i - IWM_FIRST_OFDM_RATE;
> -   ofdm |= (1 << adj);
> +   for (i = IWM_FIRST_OFDM_RATE;
> +   i <= MIN(IWM_LAST_NON_HT_RATE, rs->rs_nrates - 1); i++) {
> +   if ((rs->rs_rates[i] & IEEE80211_RATE_BASIC) == 0)
> +   continue;
> +   ofdm |= (1 << (i - IWM_FIRST_OFDM_RATE));
> if (lowest_present_ofdm > i)
> lowest_present_ofdm = i;
> }



Re: Slow wifi

2016-11-10 Thread Donald Allen
On Thu, Nov 10, 2016 at 3:54 PM, Stefan Sperling  wrote:
> On Thu, Nov 10, 2016 at 03:22:45PM -0500, Donald Allen wrote:
>> (FreeBSD doesn't seem to know about iwm yet). After waiting a bit, I
>> will again try installing -current on a USB drive to see if the
>> package problems have been resolved.
>
> Please do. If it's still broken in -current I'd like to know about that.

Yes, I will.



Re: Slow wifi

2016-11-10 Thread Stefan Sperling
On Thu, Nov 10, 2016 at 03:22:45PM -0500, Donald Allen wrote:
> (FreeBSD doesn't seem to know about iwm yet). After waiting a bit, I
> will again try installing -current on a USB drive to see if the
> package problems have been resolved.

Please do. If it's still broken in -current I'd like to know about that.



Re: Slow wifi

2016-11-10 Thread Stefan Sperling
On Thu, Nov 10, 2016 at 10:24:50PM +0200, George Pediaditis wrote:
> i currently use stable. I updated my system a week ago. How stable is current?
> I use my laptop for programming (java) and im a bit skeptical about
> running current.

Generally, -current is fine. But if you don't follow our development
process at least a bit you might upgrade at a bad moment and run into
surprises. Most issues will fix themselves after a few days and we're
always welcoming reports from users running -current since that really
helps us make the next release better.

I have spent many hours making many changes since 6.0 which fixed
several issues in the iwm driver and the wireless framework.
All these fixes will of course ship in 6.1.
I'm sorry but this kind of problem is not something we officially
backport fixes to -stable for because it just takes too much time
on top of all the time already spent on development for -current.

That said, I'll include one fix I made below. I don't know if it
provides a huge improvement in isolation but if you really want
to stick with -stable then this patch is worth a shot. I know that
it compiles but I haven't run this on a 6.0 system myself.

Index: if_iwm.c
===
RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -p -r1.132 -r1.133
--- if_iwm.c12 Sep 2016 10:18:26 -  1.132
+++ if_iwm.c21 Sep 2016 12:56:43 -  1.133
@@ -4896,6 +4896,7 @@ iwm_ack_rates(struct iwm_softc *sc, stru
 int *ofdm_rates)
 {
struct ieee80211_node *ni = &in->in_ni;
+   struct ieee80211_rateset *rs = &ni->ni_rates;
int lowest_present_ofdm = 100;
int lowest_present_cck = 100;
uint8_t cck = 0;
@@ -4904,15 +4905,19 @@ iwm_ack_rates(struct iwm_softc *sc, stru
 
if (ni->ni_chan == IEEE80211_CHAN_ANYC ||
IEEE80211_IS_CHAN_2GHZ(ni->ni_chan)) {
-   for (i = 0; i <= IWM_LAST_CCK_RATE; i++) {
+   for (i = 0; i < MIN(IWM_FIRST_OFDM_RATE, rs->rs_nrates); i++) {
+   if ((rs->rs_rates[i] & IEEE80211_RATE_BASIC) == 0)
+   continue;
cck |= (1 << i);
if (lowest_present_cck > i)
lowest_present_cck = i;
}
}
-   for (i = IWM_FIRST_OFDM_RATE; i <= IWM_LAST_NON_HT_RATE; i++) {
-   int adj = i - IWM_FIRST_OFDM_RATE;
-   ofdm |= (1 << adj);
+   for (i = IWM_FIRST_OFDM_RATE;
+   i <= MIN(IWM_LAST_NON_HT_RATE, rs->rs_nrates - 1); i++) {
+   if ((rs->rs_rates[i] & IEEE80211_RATE_BASIC) == 0)
+   continue;   
+   ofdm |= (1 << (i - IWM_FIRST_OFDM_RATE));
if (lowest_present_ofdm > i)
lowest_present_ofdm = i;
}



Re: Slow wifi

2016-11-10 Thread George Pediaditis
i currently use stable. I updated my system a week ago. How stable is current?
I use my laptop for programming (java) and im a bit skeptical about
running current.

On Thu, Nov 10, 2016 at 10:09 PM, Stefan Sperling  wrote:
> On Thu, Nov 10, 2016 at 09:17:38PM +0200, George Pediaditis wrote:
>> hello
>> Im having trouble with wifi. I cant download faster than 523.94kBit/s
>> Im using the iwm0 driver.
>
> Please try -current. This problem should be fixed there.



Re: Slow wifi

2016-11-10 Thread Donald Allen
On Thu, Nov 10, 2016 at 3:09 PM, Stefan Sperling  wrote:
> On Thu, Nov 10, 2016 at 09:17:38PM +0200, George Pediaditis wrote:
>> hello
>> Im having trouble with wifi. I cant download faster than 523.94kBit/s
>> Im using the iwm0 driver.
>
> Please try -current. This problem should be fixed there.

I've observed the same problem on a Thinkpad X250, which also uses the
iwm0 driver. Running 6.0, src.tar.gz took around 15 minutes to
download from the mirror at MIT (I tried this several times over a few
days with similar results). Running Archlinux on the same machine,
downloading the same file from the same site took about 30 seconds. I
tried installing -current but ran into some package version skew
issues. Needing the machine, I had no choice but to install Linux
(FreeBSD doesn't seem to know about iwm yet). After waiting a bit, I
will again try installing -current on a USB drive to see if the
package problems have been resolved.



Re: Slow wifi

2016-11-10 Thread Stefan Sperling
On Thu, Nov 10, 2016 at 09:17:38PM +0200, George Pediaditis wrote:
> hello
> Im having trouble with wifi. I cant download faster than 523.94kBit/s
> Im using the iwm0 driver.

Please try -current. This problem should be fixed there.