hc
2024-02-20 e636c8d336489bf3eed5878299e6cc045bbad077
kernel/drivers/staging/wlan-ng/prism2mib.c
....@@ -126,19 +126,13 @@
126126 struct p80211msg_dot11req_mibset *msg,
127127 void *data);
128128
129
-static int prism2mib_excludeunencrypted(struct mibrec *mib,
130
- int isget,
131
- struct wlandevice *wlandev,
132
- struct hfa384x *hw,
133
- struct p80211msg_dot11req_mibset *msg,
134
- void *data);
135
-
136
-static int prism2mib_fragmentationthreshold(struct mibrec *mib,
137
- int isget,
138
- struct wlandevice *wlandev,
139
- struct hfa384x *hw,
140
- struct p80211msg_dot11req_mibset *msg,
141
- void *data);
129
+static int
130
+prism2mib_fragmentationthreshold(struct mibrec *mib,
131
+ int isget,
132
+ struct wlandevice *wlandev,
133
+ struct hfa384x *hw,
134
+ struct p80211msg_dot11req_mibset *msg,
135
+ void *data);
142136
143137 static int prism2mib_priv(struct mibrec *mib,
144138 int isget,
....@@ -148,89 +142,89 @@
148142
149143 static struct mibrec mibtab[] = {
150144 /* dot11smt MIB's */
151
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(1),
145
+ {didmib_dot11smt_wepdefaultkeystable_key(1),
152146 F_STA | F_WRITE,
153147 HFA384x_RID_CNFWEPDEFAULTKEY0, 0, 0,
154148 prism2mib_wepdefaultkey},
155
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(2),
149
+ {didmib_dot11smt_wepdefaultkeystable_key(2),
156150 F_STA | F_WRITE,
157151 HFA384x_RID_CNFWEPDEFAULTKEY1, 0, 0,
158152 prism2mib_wepdefaultkey},
159
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(3),
153
+ {didmib_dot11smt_wepdefaultkeystable_key(3),
160154 F_STA | F_WRITE,
161155 HFA384x_RID_CNFWEPDEFAULTKEY2, 0, 0,
162156 prism2mib_wepdefaultkey},
163
- {DIDmib_dot11smt_dot11WEPDefaultKeysTable_key(4),
157
+ {didmib_dot11smt_wepdefaultkeystable_key(4),
164158 F_STA | F_WRITE,
165159 HFA384x_RID_CNFWEPDEFAULTKEY3, 0, 0,
166160 prism2mib_wepdefaultkey},
167
- {DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked,
161
+ {DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED,
168162 F_STA | F_READ | F_WRITE,
169163 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_PRIVINVOKED, 0,
170164 prism2mib_privacyinvoked},
171
- {DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID,
165
+ {DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
172166 F_STA | F_READ | F_WRITE,
173167 HFA384x_RID_CNFWEPDEFAULTKEYID, 0, 0,
174168 prism2mib_uint32},
175
- {DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted,
169
+ {DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED,
176170 F_STA | F_READ | F_WRITE,
177171 HFA384x_RID_CNFWEPFLAGS, HFA384x_WEPFLAGS_EXCLUDE, 0,
178
- prism2mib_excludeunencrypted},
172
+ prism2mib_flag},
179173
180174 /* dot11mac MIB's */
181175
182
- {DIDmib_dot11mac_dot11OperationTable_dot11MACAddress,
176
+ {DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS,
183177 F_STA | F_READ | F_WRITE,
184178 HFA384x_RID_CNFOWNMACADDR, HFA384x_RID_CNFOWNMACADDR_LEN, 0,
185179 prism2mib_bytearea2pstr},
186
- {DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold,
180
+ {DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD,
187181 F_STA | F_READ | F_WRITE,
188182 HFA384x_RID_RTSTHRESH, 0, 0,
189183 prism2mib_uint32},
190
- {DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit,
184
+ {DIDMIB_DOT11MAC_OPERATIONTABLE_SHORTRETRYLIMIT,
191185 F_STA | F_READ,
192186 HFA384x_RID_SHORTRETRYLIMIT, 0, 0,
193187 prism2mib_uint32},
194
- {DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit,
188
+ {DIDMIB_DOT11MAC_OPERATIONTABLE_LONGRETRYLIMIT,
195189 F_STA | F_READ,
196190 HFA384x_RID_LONGRETRYLIMIT, 0, 0,
197191 prism2mib_uint32},
198
- {DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold,
192
+ {DIDMIB_DOT11MAC_OPERATIONTABLE_FRAGMENTATIONTHRESHOLD,
199193 F_STA | F_READ | F_WRITE,
200194 HFA384x_RID_FRAGTHRESH, 0, 0,
201195 prism2mib_fragmentationthreshold},
202
- {DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime,
196
+ {DIDMIB_DOT11MAC_OPERATIONTABLE_MAXTRANSMITMSDULIFETIME,
203197 F_STA | F_READ,
204198 HFA384x_RID_MAXTXLIFETIME, 0, 0,
205199 prism2mib_uint32},
206200
207201 /* dot11phy MIB's */
208202
209
- {DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel,
203
+ {DIDMIB_DOT11PHY_DSSSTABLE_CURRENTCHANNEL,
210204 F_STA | F_READ,
211205 HFA384x_RID_CURRENTCHANNEL, 0, 0,
212206 prism2mib_uint32},
213
- {DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel,
207
+ {DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL,
214208 F_STA | F_READ | F_WRITE,
215209 HFA384x_RID_TXPOWERMAX, 0, 0,
216210 prism2mib_uint32},
217211
218212 /* p2Static MIB's */
219213
220
- {DIDmib_p2_p2Static_p2CnfPortType,
214
+ {DIDMIB_P2_STATIC_CNFPORTTYPE,
221215 F_STA | F_READ | F_WRITE,
222216 HFA384x_RID_CNFPORTTYPE, 0, 0,
223217 prism2mib_uint32},
224218
225219 /* p2MAC MIB's */
226220
227
- {DIDmib_p2_p2MAC_p2CurrentTxRate,
221
+ {DIDMIB_P2_MAC_CURRENTTXRATE,
228222 F_STA | F_READ,
229223 HFA384x_RID_CURRENTTXRATE, 0, 0,
230224 prism2mib_uint32},
231225
232226 /* And finally, lnx mibs */
233
- {DIDmib_lnx_lnxConfigTable_lnxRSNAIE,
227
+ {DIDMIB_LNX_CONFIGTABLE_RSNAIE,
234228 F_STA | F_READ | F_WRITE,
235229 HFA384x_RID_CNFWPADATA, 0, 0,
236230 prism2mib_priv},
....@@ -298,10 +292,10 @@
298292 /*
299293 ** Determine if this is a "mibget" or a "mibset". If this is a
300294 ** "mibget", then make sure that the MIB may be read. Otherwise,
301
- ** this is a "mibset" so make make sure that the MIB may be written.
295
+ ** this is a "mibset" so make sure that the MIB may be written.
302296 */
303297
304
- isget = (msg->msgcode == DIDmsg_dot11req_mibget);
298
+ isget = (msg->msgcode == DIDMSG_DOT11REQ_MIBGET);
305299
306300 if (isget) {
307301 if (!(mib->flag & F_READ)) {
....@@ -593,41 +587,6 @@
593587 }
594588
595589 /*
596
- * prism2mib_excludeunencrypted
597
- *
598
- * Get/set the dot11ExcludeUnencrypted value.
599
- *
600
- * MIB record parameters:
601
- * parm1 Prism2 RID value.
602
- * parm2 Bit value for ExcludeUnencrypted flag.
603
- * parm3 Not used.
604
- *
605
- * Arguments:
606
- * mib MIB record.
607
- * isget MIBGET/MIBSET flag.
608
- * wlandev wlan device structure.
609
- * priv "priv" structure.
610
- * hw "hw" structure.
611
- * msg Message structure.
612
- * data Data buffer.
613
- *
614
- * Returns:
615
- * 0 - Success.
616
- * ~0 - Error.
617
- *
618
- */
619
-
620
-static int prism2mib_excludeunencrypted(struct mibrec *mib,
621
- int isget,
622
- struct wlandevice *wlandev,
623
- struct hfa384x *hw,
624
- struct p80211msg_dot11req_mibset *msg,
625
- void *data)
626
-{
627
- return prism2mib_flag(mib, isget, wlandev, hw, msg, data);
628
-}
629
-
630
-/*
631590 * prism2mib_fragmentationthreshold
632591 *
633592 * Get/set the fragmentation threshold.
....@@ -652,12 +611,13 @@
652611 *
653612 */
654613
655
-static int prism2mib_fragmentationthreshold(struct mibrec *mib,
656
- int isget,
657
- struct wlandevice *wlandev,
658
- struct hfa384x *hw,
659
- struct p80211msg_dot11req_mibset *msg,
660
- void *data)
614
+static int
615
+prism2mib_fragmentationthreshold(struct mibrec *mib,
616
+ int isget,
617
+ struct wlandevice *wlandev,
618
+ struct hfa384x *hw,
619
+ struct p80211msg_dot11req_mibset *msg,
620
+ void *data)
661621 {
662622 u32 *uint32 = data;
663623
....@@ -707,27 +667,27 @@
707667 struct p80211pstrd *pstr = data;
708668
709669 switch (mib->did) {
710
- case DIDmib_lnx_lnxConfigTable_lnxRSNAIE:{
711
- struct hfa384x_wpa_data wpa;
670
+ case DIDMIB_LNX_CONFIGTABLE_RSNAIE: {
671
+ struct hfa384x_wpa_data wpa;
712672
713
- if (isget) {
714
- hfa384x_drvr_getconfig(hw,
715
- HFA384x_RID_CNFWPADATA,
716
- (u8 *)&wpa,
717
- sizeof(wpa));
718
- pstr->len = le16_to_cpu(wpa.datalen);
719
- memcpy(pstr->data, wpa.data, pstr->len);
720
- } else {
721
- wpa.datalen = cpu_to_le16(pstr->len);
722
- memcpy(wpa.data, pstr->data, pstr->len);
673
+ if (isget) {
674
+ hfa384x_drvr_getconfig(hw,
675
+ HFA384x_RID_CNFWPADATA,
676
+ (u8 *)&wpa,
677
+ sizeof(wpa));
678
+ pstr->len = le16_to_cpu(wpa.datalen);
679
+ memcpy(pstr->data, wpa.data, pstr->len);
680
+ } else {
681
+ wpa.datalen = cpu_to_le16(pstr->len);
682
+ memcpy(wpa.data, pstr->data, pstr->len);
723683
724
- hfa384x_drvr_setconfig(hw,
725
- HFA384x_RID_CNFWPADATA,
726
- (u8 *)&wpa,
727
- sizeof(wpa));
728
- }
729
- break;
684
+ hfa384x_drvr_setconfig(hw,
685
+ HFA384x_RID_CNFWPADATA,
686
+ (u8 *)&wpa,
687
+ sizeof(wpa));
730688 }
689
+ break;
690
+ }
731691 default:
732692 netdev_err(wlandev->netdev, "Unhandled DID 0x%08x\n", mib->did);
733693 }