Skip to content

Commit fe2deb6

Browse files
Fix the misalignment with previous code and redundant comment
1 parent fed10f6 commit fe2deb6

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

vwifi.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ struct vwifi_vif {
8888
struct wireless_dev wdev;
8989
struct net_device *ndev;
9090
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;
9493
size_t ssid_len;
9594
/* Currently connected BSS id */
9695
u8 bssid[ETH_ALEN];
@@ -1406,7 +1405,7 @@ static int vwifi_get_station(struct wiphy *wiphy,
14061405
sinfo->rx_bytes = vif->stats.rx_bytes;
14071406

14081407

1409-
/* Log byte counters for debugging */ /* CHANGED */
1408+
/* Log byte counters for debugging */
14101409
pr_info(
14111410
"vwifi: Station %pM tx_bytes %llu, rx_bytes %llu, tx_packets %u, "
14121411
"rx_packets %u, tx_failed %u\n",
@@ -1415,8 +1414,7 @@ static int vwifi_get_station(struct wiphy *wiphy,
14151414

14161415
/* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in dBm */
14171416
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);
14201418
sinfo->inactive_time = jiffies_to_msecs(jiffies - vif->active_time);
14211419
/*
14221420
* Using 802.11n (HT) as the PHY, configure as follows:
@@ -1743,8 +1741,13 @@ static int vwifi_start_ap(struct wiphy *wiphy,
17431741

17441742
/* Initialize hrtimer of beacon */
17451743
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
17461748
hrtimer_init(&vif->beacon_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_SOFT);
17471749
vif->beacon_timer.function = vwifi_beacon;
1750+
#endif
17481751

17491752
if (!hrtimer_is_queued(&vif->beacon_timer)) {
17501753
u64 tsf, until_tbtt;

0 commit comments

Comments
 (0)