~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/mac802154/mib.c

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /net/mac802154/mib.c (Version linux-6.12-rc7) and /net/mac802154/mib.c (Version linux-5.15.169)


** Warning: Cannot open xref database.

  1 // SPDX-License-Identifier: GPL-2.0-only            1 
  2 /*                                                
  3  * Copyright 2007-2012 Siemens AG                 
  4  *                                                
  5  * Written by:                                    
  6  * Dmitry Eremin-Solenikov <dbaryshkov@gmail.c    
  7  * Sergey Lapin <slapin@ossfans.org>              
  8  * Maxim Gorbachyov <maxim.gorbachev@siemens.c    
  9  * Alexander Smirnov <alex.bluesman.smirnov@gm    
 10  */                                               
 11                                                   
 12 #include <linux/if_arp.h>                         
 13                                                   
 14 #include <net/mac802154.h>                        
 15 #include <net/ieee802154_netdev.h>                
 16 #include <net/cfg802154.h>                        
 17                                                   
 18 #include "ieee802154_i.h"                         
 19 #include "driver-ops.h"                           
 20                                                   
 21 void mac802154_dev_set_page_channel(struct net    
 22 {                                                 
 23         struct ieee802154_sub_if_data *sdata =    
 24         struct ieee802154_local *local = sdata    
 25         int res;                                  
 26                                                   
 27         ASSERT_RTNL();                            
 28                                                   
 29         BUG_ON(dev->type != ARPHRD_IEEE802154)    
 30                                                   
 31         res = drv_set_channel(local, page, cha    
 32         if (res) {                                
 33                 pr_debug("set_channel failed\n    
 34         } else {                                  
 35                 local->phy->current_channel =     
 36                 local->phy->current_page = pag    
 37         }                                         
 38 }                                                 
 39                                                   
 40 int mac802154_get_params(struct net_device *de    
 41                          struct ieee802154_lls    
 42 {                                                 
 43         struct ieee802154_sub_if_data *sdata =    
 44         int res;                                  
 45                                                   
 46         BUG_ON(dev->type != ARPHRD_IEEE802154)    
 47                                                   
 48         mutex_lock(&sdata->sec_mtx);              
 49         res = mac802154_llsec_get_params(&sdat    
 50         mutex_unlock(&sdata->sec_mtx);            
 51                                                   
 52         return res;                               
 53 }                                                 
 54                                                   
 55 int mac802154_set_params(struct net_device *de    
 56                          const struct ieee8021    
 57                          int changed)             
 58 {                                                 
 59         struct ieee802154_sub_if_data *sdata =    
 60         int res;                                  
 61                                                   
 62         BUG_ON(dev->type != ARPHRD_IEEE802154)    
 63                                                   
 64         mutex_lock(&sdata->sec_mtx);              
 65         res = mac802154_llsec_set_params(&sdat    
 66         mutex_unlock(&sdata->sec_mtx);            
 67                                                   
 68         return res;                               
 69 }                                                 
 70                                                   
 71 int mac802154_add_key(struct net_device *dev,     
 72                       const struct ieee802154_    
 73                       const struct ieee802154_    
 74 {                                                 
 75         struct ieee802154_sub_if_data *sdata =    
 76         int res;                                  
 77                                                   
 78         BUG_ON(dev->type != ARPHRD_IEEE802154)    
 79                                                   
 80         mutex_lock(&sdata->sec_mtx);              
 81         res = mac802154_llsec_key_add(&sdata->    
 82         mutex_unlock(&sdata->sec_mtx);            
 83                                                   
 84         return res;                               
 85 }                                                 
 86                                                   
 87 int mac802154_del_key(struct net_device *dev,     
 88                       const struct ieee802154_    
 89 {                                                 
 90         struct ieee802154_sub_if_data *sdata =    
 91         int res;                                  
 92                                                   
 93         BUG_ON(dev->type != ARPHRD_IEEE802154)    
 94                                                   
 95         mutex_lock(&sdata->sec_mtx);              
 96         res = mac802154_llsec_key_del(&sdata->    
 97         mutex_unlock(&sdata->sec_mtx);            
 98                                                   
 99         return res;                               
100 }                                                 
101                                                   
102 int mac802154_add_dev(struct net_device *dev,     
103                       const struct ieee802154_    
104 {                                                 
105         struct ieee802154_sub_if_data *sdata =    
106         int res;                                  
107                                                   
108         BUG_ON(dev->type != ARPHRD_IEEE802154)    
109                                                   
110         mutex_lock(&sdata->sec_mtx);              
111         res = mac802154_llsec_dev_add(&sdata->    
112         mutex_unlock(&sdata->sec_mtx);            
113                                                   
114         return res;                               
115 }                                                 
116                                                   
117 int mac802154_del_dev(struct net_device *dev,     
118 {                                                 
119         struct ieee802154_sub_if_data *sdata =    
120         int res;                                  
121                                                   
122         BUG_ON(dev->type != ARPHRD_IEEE802154)    
123                                                   
124         mutex_lock(&sdata->sec_mtx);              
125         res = mac802154_llsec_dev_del(&sdata->    
126         mutex_unlock(&sdata->sec_mtx);            
127                                                   
128         return res;                               
129 }                                                 
130                                                   
131 int mac802154_add_devkey(struct net_device *de    
132                          __le64 device_addr,      
133                          const struct ieee8021    
134 {                                                 
135         struct ieee802154_sub_if_data *sdata =    
136         int res;                                  
137                                                   
138         BUG_ON(dev->type != ARPHRD_IEEE802154)    
139                                                   
140         mutex_lock(&sdata->sec_mtx);              
141         res = mac802154_llsec_devkey_add(&sdat    
142         mutex_unlock(&sdata->sec_mtx);            
143                                                   
144         return res;                               
145 }                                                 
146                                                   
147 int mac802154_del_devkey(struct net_device *de    
148                          __le64 device_addr,      
149                          const struct ieee8021    
150 {                                                 
151         struct ieee802154_sub_if_data *sdata =    
152         int res;                                  
153                                                   
154         BUG_ON(dev->type != ARPHRD_IEEE802154)    
155                                                   
156         mutex_lock(&sdata->sec_mtx);              
157         res = mac802154_llsec_devkey_del(&sdat    
158         mutex_unlock(&sdata->sec_mtx);            
159                                                   
160         return res;                               
161 }                                                 
162                                                   
163 int mac802154_add_seclevel(struct net_device *    
164                            const struct ieee80    
165 {                                                 
166         struct ieee802154_sub_if_data *sdata =    
167         int res;                                  
168                                                   
169         BUG_ON(dev->type != ARPHRD_IEEE802154)    
170                                                   
171         mutex_lock(&sdata->sec_mtx);              
172         res = mac802154_llsec_seclevel_add(&sd    
173         mutex_unlock(&sdata->sec_mtx);            
174                                                   
175         return res;                               
176 }                                                 
177                                                   
178 int mac802154_del_seclevel(struct net_device *    
179                            const struct ieee80    
180 {                                                 
181         struct ieee802154_sub_if_data *sdata =    
182         int res;                                  
183                                                   
184         BUG_ON(dev->type != ARPHRD_IEEE802154)    
185                                                   
186         mutex_lock(&sdata->sec_mtx);              
187         res = mac802154_llsec_seclevel_del(&sd    
188         mutex_unlock(&sdata->sec_mtx);            
189                                                   
190         return res;                               
191 }                                                 
192                                                   
193 void mac802154_lock_table(struct net_device *d    
194 {                                                 
195         struct ieee802154_sub_if_data *sdata =    
196                                                   
197         BUG_ON(dev->type != ARPHRD_IEEE802154)    
198                                                   
199         mutex_lock(&sdata->sec_mtx);              
200 }                                                 
201                                                   
202 void mac802154_get_table(struct net_device *de    
203                          struct ieee802154_lls    
204 {                                                 
205         struct ieee802154_sub_if_data *sdata =    
206                                                   
207         BUG_ON(dev->type != ARPHRD_IEEE802154)    
208                                                   
209         *t = &sdata->sec.table;                   
210 }                                                 
211                                                   
212 void mac802154_unlock_table(struct net_device     
213 {                                                 
214         struct ieee802154_sub_if_data *sdata =    
215                                                   
216         BUG_ON(dev->type != ARPHRD_IEEE802154)    
217                                                   
218         mutex_unlock(&sdata->sec_mtx);            
219 }                                                 
220                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php