aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2007-09-26 15:08:47 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:53:18 -0400
commit30ccb08847c2d89e1cf893bf5f3155c023a9d142 (patch)
treef55236fa50e7f2592a0c034191e58b3d33f3a4d6
parentb4010e08907bdafe8bf4a3fe7ef9b52ddec4dda5 (diff)
[PATCH] mac80211: bss_tim_clear must use ~ instead of !
We need to use bitwise NOT. This also cleans up the code a little bit to make it more readable. Signed-off-by: Michael Buesch <mb@bu3sch.de> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/ieee80211_i.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 0c9548a0a4ec..9e3c365e3f03 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -642,34 +642,34 @@ struct sta_attribute {
642 ssize_t (*store)(struct sta_info *, const char *buf, size_t count); 642 ssize_t (*store)(struct sta_info *, const char *buf, size_t count);
643}; 643};
644 644
645static inline void __bss_tim_set(struct ieee80211_if_ap *bss, int aid) 645static inline void __bss_tim_set(struct ieee80211_if_ap *bss, u16 aid)
646{ 646{
647 /* 647 /*
648 * This format has ben mandated by the IEEE specifications, 648 * This format has been mandated by the IEEE specifications,
649 * so this line may not be changed to use the __set_bit() format. 649 * so this line may not be changed to use the __set_bit() format.
650 */ 650 */
651 bss->tim[(aid)/8] |= 1<<((aid) % 8); 651 bss->tim[aid / 8] |= (1 << (aid % 8));
652} 652}
653 653
654static inline void bss_tim_set(struct ieee80211_local *local, 654static inline void bss_tim_set(struct ieee80211_local *local,
655 struct ieee80211_if_ap *bss, int aid) 655 struct ieee80211_if_ap *bss, u16 aid)
656{ 656{
657 read_lock_bh(&local->sta_lock); 657 read_lock_bh(&local->sta_lock);
658 __bss_tim_set(bss, aid); 658 __bss_tim_set(bss, aid);
659 read_unlock_bh(&local->sta_lock); 659 read_unlock_bh(&local->sta_lock);
660} 660}
661 661
662static inline void __bss_tim_clear(struct ieee80211_if_ap *bss, int aid) 662static inline void __bss_tim_clear(struct ieee80211_if_ap *bss, u16 aid)
663{ 663{
664 /* 664 /*
665 * This format has ben mandated by the IEEE specifications, 665 * This format has been mandated by the IEEE specifications,
666 * so this line may not be changed to use the __clear_bit() format. 666 * so this line may not be changed to use the __clear_bit() format.
667 */ 667 */
668 bss->tim[(aid)/8] &= !(1<<((aid) % 8)); 668 bss->tim[aid / 8] &= ~(1 << (aid % 8));
669} 669}
670 670
671static inline void bss_tim_clear(struct ieee80211_local *local, 671static inline void bss_tim_clear(struct ieee80211_local *local,
672 struct ieee80211_if_ap *bss, int aid) 672 struct ieee80211_if_ap *bss, u16 aid)
673{ 673{
674 read_lock_bh(&local->sta_lock); 674 read_lock_bh(&local->sta_lock);
675 __bss_tim_clear(bss, aid); 675 __bss_tim_clear(bss, aid);