@@ -390,6 +390,20 @@ static inline struct vwifi_vif *wdev_get_vwifi_vif(struct wireless_dev *wdev)
390
390
return container_of (wdev , struct vwifi_vif , wdev );
391
391
}
392
392
393
+ /* helper function to retrieve vif from wiphy */
394
+ static struct vwifi_vif * wiphy_get_vwifi_vif (struct wiphy * wiphy )
395
+ {
396
+ struct wireless_dev * wdev ;
397
+ struct vwifi_vif * vif = NULL ;
398
+
399
+ list_for_each_entry (wdev , & wiphy -> wdev_list , list ) {
400
+ vif = container_of (wdev , struct vwifi_vif , wdev );
401
+ break ; /* Assuming only one virtual interface is present */
402
+ }
403
+
404
+ return vif ;
405
+ }
406
+
393
407
static inline u32 vwifi_mac_to_32 (const u8 * mac )
394
408
{
395
409
u32 h = 3323198485U ;
@@ -1843,19 +1857,6 @@ static int vwifi_delete_interface(struct vwifi_vif *vif)
1843
1857
return 0 ;
1844
1858
}
1845
1859
1846
- static struct vwifi_vif * wiphy_get_vwifi_vif (struct wiphy * wiphy )
1847
- {
1848
- struct wireless_dev * wdev ;
1849
- struct vwifi_vif * vif = NULL ;
1850
-
1851
- list_for_each_entry (wdev , & wiphy -> wdev_list , list ) {
1852
- vif = container_of (wdev , struct vwifi_vif , wdev );
1853
- break ; /* Assuming only one virtual interface is present */
1854
- }
1855
-
1856
- return vif ;
1857
- }
1858
-
1859
1860
/* Set transmit power for the virtual interface */
1860
1861
static int vwifi_set_tx_power (struct wiphy * wiphy ,
1861
1862
struct wireless_dev * wdev ,
0 commit comments