@@ -88,9 +88,8 @@ struct vwifi_vif {
88
88
struct wireless_dev wdev ;
89
89
struct net_device * ndev ;
90
90
struct net_device_stats stats ;
91
- int manual_mcs ; /* ADDED: Store user-specified MCS */
92
- bool manual_mcs_set ; /* ADDED: Flag to indicate manual MCS override */
93
-
91
+ int manual_mcs ;
92
+ bool manual_mcs_set ;
94
93
size_t ssid_len ;
95
94
/* Currently connected BSS id */
96
95
u8 bssid [ETH_ALEN ];
@@ -1406,7 +1405,7 @@ static int vwifi_get_station(struct wiphy *wiphy,
1406
1405
sinfo -> rx_bytes = vif -> stats .rx_bytes ;
1407
1406
1408
1407
1409
- /* Log byte counters for debugging */ /* CHANGED */
1408
+ /* Log byte counters for debugging */
1410
1409
pr_info (
1411
1410
"vwifi: Station %pM tx_bytes %llu, rx_bytes %llu, tx_packets %u, "
1412
1411
"rx_packets %u, tx_failed %u\n" ,
@@ -1415,8 +1414,7 @@ static int vwifi_get_station(struct wiphy *wiphy,
1415
1414
1416
1415
/* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in dBm */
1417
1416
sinfo -> signal = rand_int_smooth (-100 , -30 , jiffies );
1418
- pr_info ("vwifi: Station %pM signal %d dBm (raw)\n" , mac ,
1419
- sinfo -> signal ); /* ADDED */
1417
+ pr_info ("vwifi: Station %pM signal %d dBm (raw)\n" , mac , sinfo -> signal );
1420
1418
sinfo -> inactive_time = jiffies_to_msecs (jiffies - vif -> active_time );
1421
1419
/*
1422
1420
* Using 802.11n (HT) as the PHY, configure as follows:
@@ -1743,8 +1741,13 @@ static int vwifi_start_ap(struct wiphy *wiphy,
1743
1741
1744
1742
/* Initialize hrtimer of beacon */
1745
1743
pr_info ("vwifi: init beacon_timer.\n" );
1744
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION (6 , 15 , 0 )
1745
+ hrtimer_setup (& vif -> beacon_timer , vwifi_beacon , CLOCK_MONOTONIC ,
1746
+ HRTIMER_MODE_ABS_SOFT );
1747
+ #else
1746
1748
hrtimer_init (& vif -> beacon_timer , CLOCK_MONOTONIC , HRTIMER_MODE_ABS_SOFT );
1747
1749
vif -> beacon_timer .function = vwifi_beacon ;
1750
+ #endif
1748
1751
1749
1752
if (!hrtimer_is_queued (& vif -> beacon_timer )) {
1750
1753
u64 tsf , until_tbtt ;
0 commit comments