Skip to content

Commit 5446ccc

Browse files
Fix coding style
1 parent 535c789 commit 5446ccc

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

vwifi.c

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +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;
92-
bool manual_mcs_set;
91+
int manual_mcs;
92+
bool manual_mcs_set;
9393
size_t ssid_len;
9494
/* Currently connected BSS id */
9595
u8 bssid[ETH_ALEN];
@@ -1405,7 +1405,7 @@ static int vwifi_get_station(struct wiphy *wiphy,
14051405
sinfo->rx_bytes = vif->stats.rx_bytes;
14061406

14071407

1408-
/* Log byte counters for debugging */
1408+
/* Log byte counters for debugging */
14091409
pr_info(
14101410
"vwifi: Station %pM tx_bytes %llu, rx_bytes %llu, tx_packets %u, "
14111411
"rx_packets %u, tx_failed %u\n",
@@ -1414,8 +1414,7 @@ static int vwifi_get_station(struct wiphy *wiphy,
14141414

14151415
/* For CFG80211_SIGNAL_TYPE_MBM, value is expressed in dBm */
14161416
sinfo->signal = rand_int_smooth(-100, -30, jiffies);
1417-
pr_info("vwifi: Station %pM signal %d dBm (raw)\n", mac,
1418-
sinfo->signal);
1417+
pr_info("vwifi: Station %pM signal %d dBm (raw)\n", mac, sinfo->signal);
14191418
sinfo->inactive_time = jiffies_to_msecs(jiffies - vif->active_time);
14201419
/*
14211420
* Using 802.11n (HT) as the PHY, configure as follows:
@@ -1742,14 +1741,14 @@ static int vwifi_start_ap(struct wiphy *wiphy,
17421741

17431742
/* Initialize hrtimer of beacon */
17441743
pr_info("vwifi: init beacon_timer.\n");
1745-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
1744+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 15, 0)
17461745
hrtimer_setup(&vif->beacon_timer, vwifi_beacon, CLOCK_MONOTONIC,
1747-
HRTIMER_MODE_ABS_SOFT);
1748-
#else
1746+
HRTIMER_MODE_ABS_SOFT);
1747+
#else
17491748
hrtimer_init(&vif->beacon_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_SOFT);
17501749
vif->beacon_timer.function = vwifi_beacon;
1751-
#endif
1752-
1750+
#endif
1751+
17531752
if (!hrtimer_is_queued(&vif->beacon_timer)) {
17541753
u64 tsf, until_tbtt;
17551754
tsf = ktime_to_us(ktime_get_real());
@@ -2304,24 +2303,27 @@ static struct cfg80211_ops vwifi_cfg_ops = {
23042303
};
23052304

23062305
/* Macro for defining 2GHZ channel array */
2307-
#define CHAN_2GHZ(channel, freq) \
2308-
{ \
2309-
.band = NL80211_BAND_2GHZ, .hw_value = (channel), \
2310-
.center_freq = (freq), \
2306+
#define CHAN_2GHZ(channel, freq) \
2307+
{ \
2308+
.band = NL80211_BAND_2GHZ, \
2309+
.hw_value = (channel), \
2310+
.center_freq = (freq), \
23112311
}
23122312

23132313
/* Macro for defining 5GHZ channel array */
2314-
#define CHAN_5GHZ(channel) \
2315-
{ \
2316-
.band = NL80211_BAND_5GHZ, .hw_value = (channel), \
2317-
.center_freq = 5000 + (5 * (channel)), \
2314+
#define CHAN_5GHZ(channel) \
2315+
{ \
2316+
.band = NL80211_BAND_5GHZ, \
2317+
.hw_value = (channel), \
2318+
.center_freq = 5000 + (5 * (channel)), \
23182319
}
23192320

23202321

23212322
/* Macro for defining rate table */
2322-
#define RATE_ENT(_rate, _hw_value) \
2323-
{ \
2324-
.bitrate = (_rate), .hw_value = (_hw_value), \
2323+
#define RATE_ENT(_rate, _hw_value) \
2324+
{ \
2325+
.bitrate = (_rate), \
2326+
.hw_value = (_hw_value), \
23252327
}
23262328

23272329
/* Array of "supported" channels in 2GHz band. It is required for wiphy. */

0 commit comments

Comments
 (0)