diff options
Diffstat (limited to 'include/net/llc.h')
-rw-r--r-- | include/net/llc.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/llc.h b/include/net/llc.h index 1559cf10e874..dbef5917905b 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
@@ -32,6 +32,9 @@ struct llc_addr { | |||
32 | #define LLC_SAP_STATE_INACTIVE 1 | 32 | #define LLC_SAP_STATE_INACTIVE 1 |
33 | #define LLC_SAP_STATE_ACTIVE 2 | 33 | #define LLC_SAP_STATE_ACTIVE 2 |
34 | 34 | ||
35 | #define LLC_SK_DEV_HASH_BITS 6 | ||
36 | #define LLC_SK_DEV_HASH_ENTRIES (1<<LLC_SK_DEV_HASH_BITS) | ||
37 | |||
35 | /** | 38 | /** |
36 | * struct llc_sap - Defines the SAP component | 39 | * struct llc_sap - Defines the SAP component |
37 | * | 40 | * |
@@ -56,8 +59,16 @@ struct llc_sap { | |||
56 | struct list_head node; | 59 | struct list_head node; |
57 | spinlock_t sk_lock; | 60 | spinlock_t sk_lock; |
58 | struct hlist_nulls_head sk_list; | 61 | struct hlist_nulls_head sk_list; |
62 | struct hlist_head sk_dev_hash[LLC_SK_DEV_HASH_ENTRIES]; | ||
59 | }; | 63 | }; |
60 | 64 | ||
65 | static inline | ||
66 | struct hlist_head *llc_sk_dev_hash(struct llc_sap *sap, int ifindex) | ||
67 | { | ||
68 | return &sap->sk_dev_hash[ifindex % LLC_SK_DEV_HASH_ENTRIES]; | ||
69 | } | ||
70 | |||
71 | |||
61 | #define LLC_DEST_INVALID 0 /* Invalid LLC PDU type */ | 72 | #define LLC_DEST_INVALID 0 /* Invalid LLC PDU type */ |
62 | #define LLC_DEST_SAP 1 /* Type 1 goes here */ | 73 | #define LLC_DEST_SAP 1 /* Type 1 goes here */ |
63 | #define LLC_DEST_CONN 2 /* Type 2 goes here */ | 74 | #define LLC_DEST_CONN 2 /* Type 2 goes here */ |