Lines Matching refs:set

26 	struct idset *set;  in idset_new()  local
28 set = vmalloc(sizeof(struct idset) + in idset_new()
30 if (set) { in idset_new()
31 set->num_ssid = num_ssid; in idset_new()
32 set->num_id = num_id; in idset_new()
33 memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id)); in idset_new()
35 return set; in idset_new()
38 void idset_free(struct idset *set) in idset_free() argument
40 vfree(set); in idset_free()
43 void idset_fill(struct idset *set) in idset_fill() argument
45 memset(set->bitmap, 0xff, in idset_fill()
46 idset_bitmap_size(set->num_ssid, set->num_id)); in idset_fill()
49 static inline void idset_add(struct idset *set, int ssid, int id) in idset_add() argument
51 set_bit(ssid * set->num_id + id, set->bitmap); in idset_add()
54 static inline void idset_del(struct idset *set, int ssid, int id) in idset_del() argument
56 clear_bit(ssid * set->num_id + id, set->bitmap); in idset_del()
59 static inline int idset_contains(struct idset *set, int ssid, int id) in idset_contains() argument
61 return test_bit(ssid * set->num_id + id, set->bitmap); in idset_contains()
69 void idset_sch_add(struct idset *set, struct subchannel_id schid) in idset_sch_add() argument
71 idset_add(set, schid.ssid, schid.sch_no); in idset_sch_add()
74 void idset_sch_del(struct idset *set, struct subchannel_id schid) in idset_sch_del() argument
76 idset_del(set, schid.ssid, schid.sch_no); in idset_sch_del()
80 void idset_sch_del_subseq(struct idset *set, struct subchannel_id schid) in idset_sch_del_subseq() argument
82 int pos = schid.ssid * set->num_id + schid.sch_no; in idset_sch_del_subseq()
84 bitmap_clear(set->bitmap, pos, set->num_id - schid.sch_no); in idset_sch_del_subseq()
87 int idset_sch_contains(struct idset *set, struct subchannel_id schid) in idset_sch_contains() argument
89 return idset_contains(set, schid.ssid, schid.sch_no); in idset_sch_contains()
92 int idset_is_empty(struct idset *set) in idset_is_empty() argument
94 return bitmap_empty(set->bitmap, set->num_ssid * set->num_id); in idset_is_empty()