|
@@ -32,7 +32,7 @@
|
|
|
#define BRCMF_FLOWRING_LOW (BRCMF_FLOWRING_HIGH - 256)
|
|
|
#define BRCMF_FLOWRING_INVALID_IFIDX 0xff
|
|
|
|
|
|
-#define BRCMF_FLOWRING_HASH_AP(da, fifo, ifidx) (da[5] + fifo + ifidx * 16)
|
|
|
+#define BRCMF_FLOWRING_HASH_AP(da, fifo, ifidx) (da[5] * 2 + fifo + ifidx * 16)
|
|
|
#define BRCMF_FLOWRING_HASH_STA(fifo, ifidx) (fifo + ifidx * 16)
|
|
|
|
|
|
static const u8 brcmf_flowring_prio2fifo[] = {
|
|
@@ -68,7 +68,7 @@ u32 brcmf_flowring_lookup(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
|
|
|
u8 prio, u8 ifidx)
|
|
|
{
|
|
|
struct brcmf_flowring_hash *hash;
|
|
|
- u8 hash_idx;
|
|
|
+ u16 hash_idx;
|
|
|
u32 i;
|
|
|
bool found;
|
|
|
bool sta;
|
|
@@ -88,6 +88,7 @@ u32 brcmf_flowring_lookup(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
|
|
|
}
|
|
|
hash_idx = sta ? BRCMF_FLOWRING_HASH_STA(fifo, ifidx) :
|
|
|
BRCMF_FLOWRING_HASH_AP(mac, fifo, ifidx);
|
|
|
+ hash_idx &= (BRCMF_FLOWRING_HASHSIZE - 1);
|
|
|
found = false;
|
|
|
hash = flow->hash;
|
|
|
for (i = 0; i < BRCMF_FLOWRING_HASHSIZE; i++) {
|
|
@@ -98,6 +99,7 @@ u32 brcmf_flowring_lookup(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
|
|
|
break;
|
|
|
}
|
|
|
hash_idx++;
|
|
|
+ hash_idx &= (BRCMF_FLOWRING_HASHSIZE - 1);
|
|
|
}
|
|
|
if (found)
|
|
|
return hash[hash_idx].flowid;
|
|
@@ -111,7 +113,7 @@ u32 brcmf_flowring_create(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
|
struct brcmf_flowring_hash *hash;
|
|
|
- u8 hash_idx;
|
|
|
+ u16 hash_idx;
|
|
|
u32 i;
|
|
|
bool found;
|
|
|
u8 fifo;
|
|
@@ -131,6 +133,7 @@ u32 brcmf_flowring_create(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
|
|
|
}
|
|
|
hash_idx = sta ? BRCMF_FLOWRING_HASH_STA(fifo, ifidx) :
|
|
|
BRCMF_FLOWRING_HASH_AP(mac, fifo, ifidx);
|
|
|
+ hash_idx &= (BRCMF_FLOWRING_HASHSIZE - 1);
|
|
|
found = false;
|
|
|
hash = flow->hash;
|
|
|
for (i = 0; i < BRCMF_FLOWRING_HASHSIZE; i++) {
|
|
@@ -140,6 +143,7 @@ u32 brcmf_flowring_create(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
|
|
|
break;
|
|
|
}
|
|
|
hash_idx++;
|
|
|
+ hash_idx &= (BRCMF_FLOWRING_HASHSIZE - 1);
|
|
|
}
|
|
|
if (found) {
|
|
|
for (i = 0; i < flow->nrofrings; i++) {
|
|
@@ -169,7 +173,7 @@ u32 brcmf_flowring_create(struct brcmf_flowring *flow, u8 da[ETH_ALEN],
|
|
|
}
|
|
|
|
|
|
|
|
|
-u8 brcmf_flowring_tid(struct brcmf_flowring *flow, u8 flowid)
|
|
|
+u8 brcmf_flowring_tid(struct brcmf_flowring *flow, u16 flowid)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
|
|
|
@@ -179,7 +183,7 @@ u8 brcmf_flowring_tid(struct brcmf_flowring *flow, u8 flowid)
|
|
|
}
|
|
|
|
|
|
|
|
|
-static void brcmf_flowring_block(struct brcmf_flowring *flow, u8 flowid,
|
|
|
+static void brcmf_flowring_block(struct brcmf_flowring *flow, u16 flowid,
|
|
|
bool blocked)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
@@ -228,10 +232,10 @@ static void brcmf_flowring_block(struct brcmf_flowring *flow, u8 flowid,
|
|
|
}
|
|
|
|
|
|
|
|
|
-void brcmf_flowring_delete(struct brcmf_flowring *flow, u8 flowid)
|
|
|
+void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
|
- u8 hash_idx;
|
|
|
+ u16 hash_idx;
|
|
|
struct sk_buff *skb;
|
|
|
|
|
|
ring = flow->rings[flowid];
|
|
@@ -253,7 +257,7 @@ void brcmf_flowring_delete(struct brcmf_flowring *flow, u8 flowid)
|
|
|
}
|
|
|
|
|
|
|
|
|
-u32 brcmf_flowring_enqueue(struct brcmf_flowring *flow, u8 flowid,
|
|
|
+u32 brcmf_flowring_enqueue(struct brcmf_flowring *flow, u16 flowid,
|
|
|
struct sk_buff *skb)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
@@ -279,7 +283,7 @@ u32 brcmf_flowring_enqueue(struct brcmf_flowring *flow, u8 flowid,
|
|
|
}
|
|
|
|
|
|
|
|
|
-struct sk_buff *brcmf_flowring_dequeue(struct brcmf_flowring *flow, u8 flowid)
|
|
|
+struct sk_buff *brcmf_flowring_dequeue(struct brcmf_flowring *flow, u16 flowid)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
|
struct sk_buff *skb;
|
|
@@ -300,7 +304,7 @@ struct sk_buff *brcmf_flowring_dequeue(struct brcmf_flowring *flow, u8 flowid)
|
|
|
}
|
|
|
|
|
|
|
|
|
-void brcmf_flowring_reinsert(struct brcmf_flowring *flow, u8 flowid,
|
|
|
+void brcmf_flowring_reinsert(struct brcmf_flowring *flow, u16 flowid,
|
|
|
struct sk_buff *skb)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
@@ -311,7 +315,7 @@ void brcmf_flowring_reinsert(struct brcmf_flowring *flow, u8 flowid,
|
|
|
}
|
|
|
|
|
|
|
|
|
-u32 brcmf_flowring_qlen(struct brcmf_flowring *flow, u8 flowid)
|
|
|
+u32 brcmf_flowring_qlen(struct brcmf_flowring *flow, u16 flowid)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
|
|
|
@@ -326,7 +330,7 @@ u32 brcmf_flowring_qlen(struct brcmf_flowring *flow, u8 flowid)
|
|
|
}
|
|
|
|
|
|
|
|
|
-void brcmf_flowring_open(struct brcmf_flowring *flow, u8 flowid)
|
|
|
+void brcmf_flowring_open(struct brcmf_flowring *flow, u16 flowid)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
|
|
|
@@ -340,10 +344,10 @@ void brcmf_flowring_open(struct brcmf_flowring *flow, u8 flowid)
|
|
|
}
|
|
|
|
|
|
|
|
|
-u8 brcmf_flowring_ifidx_get(struct brcmf_flowring *flow, u8 flowid)
|
|
|
+u8 brcmf_flowring_ifidx_get(struct brcmf_flowring *flow, u16 flowid)
|
|
|
{
|
|
|
struct brcmf_flowring_ring *ring;
|
|
|
- u8 hash_idx;
|
|
|
+ u16 hash_idx;
|
|
|
|
|
|
ring = flow->rings[flowid];
|
|
|
hash_idx = ring->hash_id;
|
|
@@ -384,7 +388,7 @@ void brcmf_flowring_detach(struct brcmf_flowring *flow)
|
|
|
struct brcmf_pub *drvr = bus_if->drvr;
|
|
|
struct brcmf_flowring_tdls_entry *search;
|
|
|
struct brcmf_flowring_tdls_entry *remove;
|
|
|
- u8 flowid;
|
|
|
+ u16 flowid;
|
|
|
|
|
|
for (flowid = 0; flowid < flow->nrofrings; flowid++) {
|
|
|
if (flow->rings[flowid])
|
|
@@ -408,7 +412,7 @@ void brcmf_flowring_configure_addr_mode(struct brcmf_flowring *flow, int ifidx,
|
|
|
struct brcmf_bus *bus_if = dev_get_drvdata(flow->dev);
|
|
|
struct brcmf_pub *drvr = bus_if->drvr;
|
|
|
u32 i;
|
|
|
- u8 flowid;
|
|
|
+ u16 flowid;
|
|
|
|
|
|
if (flow->addr_mode[ifidx] != addr_mode) {
|
|
|
for (i = 0; i < ARRAY_SIZE(flow->hash); i++) {
|
|
@@ -434,7 +438,7 @@ void brcmf_flowring_delete_peer(struct brcmf_flowring *flow, int ifidx,
|
|
|
struct brcmf_flowring_tdls_entry *prev;
|
|
|
struct brcmf_flowring_tdls_entry *search;
|
|
|
u32 i;
|
|
|
- u8 flowid;
|
|
|
+ u16 flowid;
|
|
|
bool sta;
|
|
|
|
|
|
sta = (flow->addr_mode[ifidx] == ADDR_INDIRECT);
|