Skip to content

Commit 2445e3a

Browse files
Philipp Hortmanngregkh
authored andcommitted
staging: rtl8192e: Rename RTLLIB_LINKED to MAC80211_LINKED
Rename RTLLIB_LINKED to MAC80211_LINKED to align with rtlwifi driver. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/532bd98301657b2a8329e95eccb993540ae9ba3f.1687007788.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent fff6e86 commit 2445e3a

11 files changed

Lines changed: 62 additions & 62 deletions

File tree

drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ static void _rtl92e_update_msr(struct net_device *dev)
5252

5353
switch (priv->rtllib->iw_mode) {
5454
case IW_MODE_INFRA:
55-
if (priv->rtllib->link_state == RTLLIB_LINKED)
55+
if (priv->rtllib->link_state == MAC80211_LINKED)
5656
msr |= MSR_LINK_MANAGED;
5757
break;
5858
case IW_MODE_ADHOC:
59-
if (priv->rtllib->link_state == RTLLIB_LINKED)
59+
if (priv->rtllib->link_state == MAC80211_LINKED)
6060
msr |= MSR_LINK_ADHOC;
6161
break;
6262
case IW_MODE_MASTER:
63-
if (priv->rtllib->link_state == RTLLIB_LINKED)
63+
if (priv->rtllib->link_state == MAC80211_LINKED)
6464
msr |= MSR_LINK_MASTER;
6565
break;
6666
default:
@@ -745,7 +745,7 @@ void rtl92e_link_change(struct net_device *dev)
745745
if (!priv->up)
746746
return;
747747

748-
if (ieee->link_state == RTLLIB_LINKED) {
748+
if (ieee->link_state == MAC80211_LINKED) {
749749
_rtl92e_net_update(dev);
750750
rtl92e_update_ratr_table(dev);
751751
if ((ieee->pairwise_key_type == KEY_TYPE_WEP40) ||
@@ -760,7 +760,7 @@ void rtl92e_link_change(struct net_device *dev)
760760
u32 reg;
761761

762762
reg = rtl92e_readl(dev, RCR);
763-
if (priv->rtllib->link_state == RTLLIB_LINKED) {
763+
if (priv->rtllib->link_state == MAC80211_LINKED) {
764764
if (ieee->intel_promiscuous_md_info.promiscuous_on)
765765
;
766766
else

drivers/staging/rtl8192e/rtl8192e/rtl_core.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ bool rtl92e_set_rf_state(struct net_device *dev,
169169
(priv->rtllib->iw_mode == IW_MODE_ADHOC)) {
170170
if ((priv->rtllib->rf_off_reason > RF_CHANGE_BY_IPS) ||
171171
(change_source > RF_CHANGE_BY_IPS)) {
172-
if (ieee->link_state == RTLLIB_LINKED)
172+
if (ieee->link_state == MAC80211_LINKED)
173173
priv->blinked_ingpio = true;
174174
else
175175
priv->blinked_ingpio = false;
@@ -327,7 +327,7 @@ static void _rtl92e_qos_activate(void *data)
327327
int i;
328328

329329
mutex_lock(&priv->mutex);
330-
if (priv->rtllib->link_state != RTLLIB_LINKED)
330+
if (priv->rtllib->link_state != MAC80211_LINKED)
331331
goto success;
332332

333333
for (i = 0; i < QOS_QUEUE_NUM; i++)
@@ -344,7 +344,7 @@ static int _rtl92e_qos_handle_probe_response(struct r8192_priv *priv,
344344
int ret = 0;
345345
u32 size = sizeof(struct rtllib_qos_parameters);
346346

347-
if (priv->rtllib->link_state != RTLLIB_LINKED)
347+
if (priv->rtllib->link_state != MAC80211_LINKED)
348348
return ret;
349349

350350
if (priv->rtllib->iw_mode != IW_MODE_INFRA)
@@ -400,7 +400,7 @@ static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv,
400400
if (!priv || !network)
401401
return 0;
402402

403-
if (priv->rtllib->link_state != RTLLIB_LINKED)
403+
if (priv->rtllib->link_state != MAC80211_LINKED)
404404
return 0;
405405

406406
if (priv->rtllib->iw_mode != IW_MODE_INFRA)
@@ -635,7 +635,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
635635
if (priv->polling_timer_on == 0)
636636
rtl92e_check_rfctrl_gpio_timer(&priv->gpio_polling_timer);
637637

638-
if (priv->rtllib->link_state != RTLLIB_LINKED)
638+
if (priv->rtllib->link_state != MAC80211_LINKED)
639639
rtllib_softmac_start_protocol(priv->rtllib, 0);
640640
rtllib_reset_queue(priv->rtllib);
641641
_rtl92e_watchdog_timer_cb(&priv->watch_dog_timer);
@@ -660,7 +660,7 @@ static int _rtl92e_sta_down(struct net_device *dev, bool shutdownrf)
660660

661661
priv->rtllib->rtllib_ips_leave(dev);
662662

663-
if (priv->rtllib->link_state == RTLLIB_LINKED)
663+
if (priv->rtllib->link_state == MAC80211_LINKED)
664664
rtl92e_leisure_ps_leave(dev);
665665

666666
priv->up = 0;
@@ -1009,7 +1009,7 @@ static enum reset_type _rtl92e_if_check_reset(struct net_device *dev)
10091009

10101010
if (rfState == rf_on &&
10111011
(priv->rtllib->iw_mode == IW_MODE_INFRA) &&
1012-
(priv->rtllib->link_state == RTLLIB_LINKED))
1012+
(priv->rtllib->link_state == MAC80211_LINKED))
10131013
RxResetType = _rtl92e_rx_check_stuck(dev);
10141014

10151015
if (TxResetType == RESET_TYPE_NORMAL ||
@@ -1051,7 +1051,7 @@ static void _rtl92e_if_silent_reset(struct net_device *dev)
10511051

10521052
mutex_lock(&priv->wx_mutex);
10531053

1054-
if (priv->rtllib->link_state == RTLLIB_LINKED)
1054+
if (priv->rtllib->link_state == MAC80211_LINKED)
10551055
rtl92e_leisure_ps_leave(dev);
10561056

10571057
if (priv->up) {
@@ -1073,9 +1073,9 @@ static void _rtl92e_if_silent_reset(struct net_device *dev)
10731073
rtl92e_dm_deinit(dev);
10741074
rtllib_stop_scan_syncro(ieee);
10751075

1076-
if (ieee->link_state == RTLLIB_LINKED) {
1076+
if (ieee->link_state == MAC80211_LINKED) {
10771077
mutex_lock(&ieee->wx_mutex);
1078-
netdev_info(dev, "ieee->link_state is RTLLIB_LINKED\n");
1078+
netdev_info(dev, "ieee->link_state is MAC80211_LINKED\n");
10791079
rtllib_stop_send_beacons(priv->rtllib);
10801080
del_timer_sync(&ieee->associate_timer);
10811081
cancel_delayed_work(&ieee->associate_retry_wq);
@@ -1110,14 +1110,14 @@ static void _rtl92e_if_silent_reset(struct net_device *dev)
11101110

11111111
rtl92e_enable_hw_security_config(dev);
11121112

1113-
if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode ==
1113+
if (ieee->link_state == MAC80211_LINKED && ieee->iw_mode ==
11141114
IW_MODE_INFRA) {
11151115
ieee->set_chan(ieee->dev,
11161116
ieee->current_network.channel);
11171117

11181118
schedule_work(&ieee->associate_complete_wq);
11191119

1120-
} else if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode ==
1120+
} else if (ieee->link_state == MAC80211_LINKED && ieee->iw_mode ==
11211121
IW_MODE_ADHOC) {
11221122
ieee->set_chan(ieee->dev,
11231123
ieee->current_network.channel);
@@ -1181,7 +1181,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
11811181
if (!priv->up || priv->hw_radio_off)
11821182
return;
11831183

1184-
if (priv->rtllib->link_state >= RTLLIB_LINKED) {
1184+
if (priv->rtllib->link_state >= MAC80211_LINKED) {
11851185
if (priv->rtllib->CntAfterLink < 2)
11861186
priv->rtllib->CntAfterLink++;
11871187
} else {
@@ -1202,7 +1202,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
12021202
}
12031203
}
12041204
}
1205-
if ((ieee->link_state == RTLLIB_LINKED) && (ieee->iw_mode ==
1205+
if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode ==
12061206
IW_MODE_INFRA) && (!ieee->net_promiscuous_md)) {
12071207
if (ieee->link_detect_info.NumRxOkInPeriod > 100 ||
12081208
ieee->link_detect_info.NumTxOkInPeriod > 100)
@@ -1244,7 +1244,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
12441244
ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic;
12451245
ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic;
12461246

1247-
if (ieee->link_state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA) {
1247+
if (ieee->link_state == MAC80211_LINKED && ieee->iw_mode == IW_MODE_INFRA) {
12481248
u32 TotalRxBcnNum = 0;
12491249
u32 TotalRxDataNum = 0;
12501250

drivers/staging/rtl8192e/rtl8192e/rtl_dm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
291291
if (priv->rtllib->mode != WIRELESS_MODE_N_24G)
292292
return;
293293

294-
if (priv->rtllib->link_state == RTLLIB_LINKED) {
294+
if (priv->rtllib->link_state == MAC80211_LINKED) {
295295
bshort_gi_enabled = (ht_info->cur_tx_bw40mhz &&
296296
ht_info->bCurShortGI40MHz) ||
297297
(!ht_info->cur_tx_bw40mhz &&
@@ -1075,7 +1075,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_driver(struct net_device *dev)
10751075
dm_digtable.dig_state = DM_STA_DIG_OFF;
10761076
}
10771077

1078-
if (priv->rtllib->link_state == RTLLIB_LINKED)
1078+
if (priv->rtllib->link_state == MAC80211_LINKED)
10791079
dm_digtable.cur_sta_connect_state = DIG_STA_CONNECT;
10801080
else
10811081
dm_digtable.cur_sta_connect_state = DIG_STA_DISCONNECT;
@@ -1105,7 +1105,7 @@ static void _rtl92e_dm_ctrl_initgain_byrssi_false_alarm(struct net_device *dev)
11051105
dm_digtable.dig_algorithm_switch = 0;
11061106
}
11071107

1108-
if (priv->rtllib->link_state != RTLLIB_LINKED)
1108+
if (priv->rtllib->link_state != MAC80211_LINKED)
11091109
return;
11101110

11111111
if ((priv->undecorated_smoothed_pwdb > dm_digtable.rssi_low_thresh) &&
@@ -1406,7 +1406,7 @@ static void _rtl92e_dm_check_edca_turbo(struct net_device *dev)
14061406

14071407
if (priv->rtllib->iw_mode == IW_MODE_ADHOC)
14081408
goto dm_CheckEdcaTurbo_EXIT;
1409-
if (priv->rtllib->link_state != RTLLIB_LINKED)
1409+
if (priv->rtllib->link_state != MAC80211_LINKED)
14101410
goto dm_CheckEdcaTurbo_EXIT;
14111411
if (priv->rtllib->ht_info->iot_action & HT_IOT_ACT_DISABLE_EDCA_TURBO)
14121412
goto dm_CheckEdcaTurbo_EXIT;
@@ -1820,7 +1820,7 @@ static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t)
18201820
bool bSwitchFromCountDiff = false;
18211821
bool bDoubleTimeInterval = false;
18221822

1823-
if (priv->rtllib->link_state == RTLLIB_LINKED &&
1823+
if (priv->rtllib->link_state == MAC80211_LINKED &&
18241824
priv->rtllib->bfsync_enable &&
18251825
(priv->rtllib->ht_info->iot_action & HT_IOT_ACT_CDD_FSYNC)) {
18261826
u32 rate_bitmap;
@@ -1990,7 +1990,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev)
19901990
static u8 reg_c38_State = RegC38_Default;
19911991
static u32 reset_cnt;
19921992

1993-
if (priv->rtllib->link_state == RTLLIB_LINKED &&
1993+
if (priv->rtllib->link_state == MAC80211_LINKED &&
19941994
priv->rtllib->ht_info->IOTPeer == HT_IOT_PEER_BROADCOM) {
19951995
if (priv->rtllib->bfsync_enable == 0) {
19961996
switch (priv->rtllib->fsync_state) {
@@ -2043,7 +2043,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev)
20432043
break;
20442044
}
20452045

2046-
if (priv->rtllib->link_state == RTLLIB_LINKED) {
2046+
if (priv->rtllib->link_state == MAC80211_LINKED) {
20472047
if (priv->undecorated_smoothed_pwdb <=
20482048
RegC38_TH) {
20492049
if (reg_c38_State !=
@@ -2112,7 +2112,7 @@ static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
21122112
txlowpower_threshold = TX_POWER_NEAR_FIELD_THRESH_LOW;
21132113
}
21142114

2115-
if (priv->rtllib->link_state == RTLLIB_LINKED) {
2115+
if (priv->rtllib->link_state == MAC80211_LINKED) {
21162116
if (priv->undecorated_smoothed_pwdb >= txhipower_threshold) {
21172117
priv->dynamic_tx_high_pwr = true;
21182118
priv->dynamic_tx_low_pwr = false;

drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static u32 _rtl92e_ethtool_get_link(struct net_device *dev)
2727
{
2828
struct r8192_priv *priv = rtllib_priv(dev);
2929

30-
return ((priv->rtllib->link_state == RTLLIB_LINKED) ||
30+
return ((priv->rtllib->link_state == MAC80211_LINKED) ||
3131
(priv->rtllib->link_state == RTLLIB_LINKED_SCANNING));
3232
}
3333

drivers/staging/rtl8192e/rtl8192e/rtl_ps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void rtl92e_ips_enter(struct net_device *dev)
118118

119119
rt_state = priv->rtllib->rf_power_state;
120120
if (rt_state == rf_on && !psc->bSwRfProcessing &&
121-
(priv->rtllib->link_state != RTLLIB_LINKED) &&
121+
(priv->rtllib->link_state != MAC80211_LINKED) &&
122122
(priv->rtllib->iw_mode != IW_MODE_MASTER)) {
123123
psc->eInactivePowerState = rf_off;
124124
_rtl92e_ps_update_rf_state(dev);
@@ -209,7 +209,7 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
209209
&priv->rtllib->pwr_save_ctrl;
210210

211211
if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
212-
(priv->rtllib->link_state == RTLLIB_LINKED))
212+
(priv->rtllib->link_state == MAC80211_LINKED))
213213
|| (priv->rtllib->iw_mode == IW_MODE_ADHOC) ||
214214
(priv->rtllib->iw_mode == IW_MODE_MASTER))
215215
return;

drivers/staging/rtl8192e/rtl8192e/rtl_wx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
169169
priv->ps_force = false;
170170
psc->bLeisurePs = true;
171171
} else {
172-
if (priv->rtllib->link_state == RTLLIB_LINKED)
172+
if (priv->rtllib->link_state == MAC80211_LINKED)
173173
rtl92e_leisure_ps_leave(dev);
174174

175175
priv->ps_force = true;
@@ -378,7 +378,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
378378
if ((ieee->link_state >= RTLLIB_ASSOCIATING) &&
379379
(ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED))
380380
return 0;
381-
if ((priv->rtllib->link_state == RTLLIB_LINKED) &&
381+
if ((priv->rtllib->link_state == MAC80211_LINKED) &&
382382
(priv->rtllib->CntAfterLink < 2))
383383
return 0;
384384
}
@@ -409,7 +409,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
409409

410410
priv->rtllib->FirstIe_InScan = true;
411411

412-
if (priv->rtllib->link_state != RTLLIB_LINKED) {
412+
if (priv->rtllib->link_state != MAC80211_LINKED) {
413413
if (rt_state == rf_off) {
414414
if (priv->rtllib->rf_off_reason >
415415
RF_CHANGE_BY_IPS) {
@@ -1124,7 +1124,7 @@ static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)
11241124
int tmp_qual = 0;
11251125
int tmp_noise = 0;
11261126

1127-
if (ieee->link_state < RTLLIB_LINKED) {
1127+
if (ieee->link_state < MAC80211_LINKED) {
11281128
wstats->qual.qual = 10;
11291129
wstats->qual.level = 0;
11301130
wstats->qual.noise = 0x100 - 100; /* -100 dBm */

drivers/staging/rtl8192e/rtllib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ enum rtl_link_state {
11461146
/* the link is ok. the card associated to a BSS or linked
11471147
* to a ibss cell or acting as an AP and creating the bss
11481148
*/
1149-
RTLLIB_LINKED,
1149+
MAC80211_LINKED,
11501150

11511151
/* same as LINKED, but the driver shall apply RX filter
11521152
* rules as we are in NO_LINK mode. As the card is still

drivers/staging/rtl8192e/rtllib_rx.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast,
11961196
u8 nr_subframes)
11971197
{
11981198
if (unicast) {
1199-
if (ieee->link_state == RTLLIB_LINKED) {
1199+
if (ieee->link_state == MAC80211_LINKED) {
12001200
if (((ieee->link_detect_info.NumRxUnicastOkInPeriod +
12011201
ieee->link_detect_info.NumTxOkInPeriod) > 8) ||
12021202
(ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) {
@@ -2117,7 +2117,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
21172117
network->tim.tim_period = info_element->data[1];
21182118

21192119
network->dtim_period = info_element->data[1];
2120-
if (ieee->link_state != RTLLIB_LINKED)
2120+
if (ieee->link_state != MAC80211_LINKED)
21212121
break;
21222122
network->last_dtim_sta_time = jiffies;
21232123

@@ -2585,7 +2585,7 @@ static inline void rtllib_process_probe_response(
25852585
ieee->current_network.buseprotection = false;
25862586
}
25872587
if (is_beacon(frame_ctl)) {
2588-
if (ieee->link_state >= RTLLIB_LINKED)
2588+
if (ieee->link_state >= MAC80211_LINKED)
25892589
ieee->link_detect_info.NumRecvBcnInPeriod++;
25902590
}
25912591
}
@@ -2654,7 +2654,7 @@ static inline void rtllib_process_probe_response(
26542654
if (is_beacon(frame_ctl) &&
26552655
is_same_network(&ieee->current_network, network,
26562656
(network->ssid_len ? 1 : 0)) &&
2657-
(ieee->link_state == RTLLIB_LINKED)) {
2657+
(ieee->link_state == MAC80211_LINKED)) {
26582658
ieee->handle_beacon(ieee->dev, beacon, &ieee->current_network);
26592659
}
26602660
free_network:
@@ -2683,7 +2683,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee,
26832683

26842684
if (ieee->sta_sleep || (ieee->ps != RTLLIB_PS_DISABLED &&
26852685
ieee->iw_mode == IW_MODE_INFRA &&
2686-
ieee->link_state == RTLLIB_LINKED))
2686+
ieee->link_state == MAC80211_LINKED))
26872687
schedule_work(&ieee->ps_task);
26882688

26892689
break;
@@ -2700,7 +2700,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee,
27002700
if ((ieee->softmac_features & IEEE_SOFTMAC_PROBERS) &&
27012701
((ieee->iw_mode == IW_MODE_ADHOC ||
27022702
ieee->iw_mode == IW_MODE_MASTER) &&
2703-
ieee->link_state == RTLLIB_LINKED))
2703+
ieee->link_state == MAC80211_LINKED))
27042704
rtllib_rx_probe_rq(ieee, skb);
27052705
break;
27062706
}

0 commit comments

Comments
 (0)