diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sparc64/spinlock.h | 24 | ||||
-rw-r--r-- | include/linux/netfilter/x_tables.h | 16 | ||||
-rw-r--r-- | include/net/ieee80211.h | 4 |
3 files changed, 40 insertions, 4 deletions
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index ec85d12d73b9..508c416e9d6a 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h | |||
@@ -131,6 +131,28 @@ static void inline __read_lock(raw_rwlock_t *lock) | |||
131 | : "memory"); | 131 | : "memory"); |
132 | } | 132 | } |
133 | 133 | ||
134 | static int inline __read_trylock(raw_rwlock_t *lock) | ||
135 | { | ||
136 | int tmp1, tmp2; | ||
137 | |||
138 | __asm__ __volatile__ ( | ||
139 | "1: ldsw [%2], %0\n" | ||
140 | " brlz,a,pn %0, 2f\n" | ||
141 | " mov 0, %0\n" | ||
142 | " add %0, 1, %1\n" | ||
143 | " cas [%2], %0, %1\n" | ||
144 | " cmp %0, %1\n" | ||
145 | " membar #StoreLoad | #StoreStore\n" | ||
146 | " bne,pn %%icc, 1b\n" | ||
147 | " mov 1, %0\n" | ||
148 | "2:" | ||
149 | : "=&r" (tmp1), "=&r" (tmp2) | ||
150 | : "r" (lock) | ||
151 | : "memory"); | ||
152 | |||
153 | return tmp1; | ||
154 | } | ||
155 | |||
134 | static void inline __read_unlock(raw_rwlock_t *lock) | 156 | static void inline __read_unlock(raw_rwlock_t *lock) |
135 | { | 157 | { |
136 | unsigned long tmp1, tmp2; | 158 | unsigned long tmp1, tmp2; |
@@ -211,12 +233,12 @@ static int inline __write_trylock(raw_rwlock_t *lock) | |||
211 | } | 233 | } |
212 | 234 | ||
213 | #define __raw_read_lock(p) __read_lock(p) | 235 | #define __raw_read_lock(p) __read_lock(p) |
236 | #define __raw_read_trylock(p) __read_trylock(p) | ||
214 | #define __raw_read_unlock(p) __read_unlock(p) | 237 | #define __raw_read_unlock(p) __read_unlock(p) |
215 | #define __raw_write_lock(p) __write_lock(p) | 238 | #define __raw_write_lock(p) __write_lock(p) |
216 | #define __raw_write_unlock(p) __write_unlock(p) | 239 | #define __raw_write_unlock(p) __write_unlock(p) |
217 | #define __raw_write_trylock(p) __write_trylock(p) | 240 | #define __raw_write_trylock(p) __write_trylock(p) |
218 | 241 | ||
219 | #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) | ||
220 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) | 242 | #define __raw_read_can_lock(rw) (!((rw)->lock & 0x80000000UL)) |
221 | #define __raw_write_can_lock(rw) (!(rw)->lock) | 243 | #define __raw_write_can_lock(rw) (!(rw)->lock) |
222 | 244 | ||
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 59ff6c430cf6..6500d4e59d46 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -19,7 +19,21 @@ struct xt_get_revision | |||
19 | /* For standard target */ | 19 | /* For standard target */ |
20 | #define XT_RETURN (-NF_REPEAT - 1) | 20 | #define XT_RETURN (-NF_REPEAT - 1) |
21 | 21 | ||
22 | #define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) | 22 | /* this is a dummy structure to find out the alignment requirement for a struct |
23 | * containing all the fundamental data types that are used in ipt_entry, | ||
24 | * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my | ||
25 | * personal pleasure to remove it -HW | ||
26 | */ | ||
27 | struct _xt_align | ||
28 | { | ||
29 | u_int8_t u8; | ||
30 | u_int16_t u16; | ||
31 | u_int32_t u32; | ||
32 | u_int64_t u64; | ||
33 | }; | ||
34 | |||
35 | #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ | ||
36 | & ~(__alignof__(struct _xt_align)-1)) | ||
23 | 37 | ||
24 | /* Standard return verdict, or do jump. */ | 38 | /* Standard return verdict, or do jump. */ |
25 | #define XT_STANDARD_TARGET "" | 39 | #define XT_STANDARD_TARGET "" |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index df05f468fa5c..9a92aef8b0b2 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -803,9 +803,9 @@ enum ieee80211_state { | |||
803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 | 803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 |
804 | #define IEEE80211_24GHZ_CHANNELS 14 | 804 | #define IEEE80211_24GHZ_CHANNELS 14 |
805 | 805 | ||
806 | #define IEEE80211_52GHZ_MIN_CHANNEL 36 | 806 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 |
807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 | 807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 |
808 | #define IEEE80211_52GHZ_CHANNELS 32 | 808 | #define IEEE80211_52GHZ_CHANNELS 131 |
809 | 809 | ||
810 | enum { | 810 | enum { |
811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), | 811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), |