Page MenuHomeFreeBSD

D60824.id190153.diff
No OneTemporary

D60824.id190153.diff

diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c
--- a/sys/dev/iwm/if_iwm.c
+++ b/sys/dev/iwm/if_iwm.c
@@ -6083,6 +6083,8 @@
}
hw = le16toh(sc->rxq.stat->closed_rb_num) & 0xfff;
+ /* Mask the returned value to the hardware ring size */
+ hw &= (count - 1);
/*
* Process responses
diff --git a/sys/dev/iwm/if_iwmvar.h b/sys/dev/iwm/if_iwmvar.h
--- a/sys/dev/iwm/if_iwmvar.h
+++ b/sys/dev/iwm/if_iwmvar.h
@@ -293,6 +293,7 @@
int cur;
};
+/* Note: these are used as a mask; must be a power of 2 */
#define IWM_RX_LEGACY_RING_COUNT 256
#define IWM_RX_MQ_RING_COUNT 512

File Metadata

Mime Type
text/plain
Expires
Mon, Oct 19, 8:45 AM (36 m, 30 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41021162
Default Alt Text
D60824.id190153.diff (599 B)

Event Timeline