Lines Matching +full:channel +full:- +full:use
2 * Operating Channel Validation (OCV)
16 * Caller of OCV functionality may use various debug output functions, so store
17 * the error here and let the caller use an appropriate debug output function.
26 oci->freq = ieee80211_chan_to_freq(NULL, oci->op_class, oci->channel); in ocv_derive_all_parameters()
27 if (oci->freq < 0) { in ocv_derive_all_parameters()
29 "Error interpreting OCI: unrecognized opclass/channel pair (%d/%d)", in ocv_derive_all_parameters()
30 oci->op_class, oci->channel); in ocv_derive_all_parameters()
31 return -1; in ocv_derive_all_parameters()
34 op_class_map = get_oper_class(NULL, oci->op_class); in ocv_derive_all_parameters()
38 oci->op_class); in ocv_derive_all_parameters()
39 return -1; in ocv_derive_all_parameters()
42 oci->chanwidth = oper_class_bw_to_int(op_class_map); in ocv_derive_all_parameters()
43 oci->sec_channel = 0; in ocv_derive_all_parameters()
44 if (op_class_map->bw == BW40PLUS) in ocv_derive_all_parameters()
45 oci->sec_channel = 1; in ocv_derive_all_parameters()
46 else if (op_class_map->bw == BW40MINUS) in ocv_derive_all_parameters()
47 oci->sec_channel = -1; in ocv_derive_all_parameters()
48 else if (op_class_map->bw == BW40) in ocv_derive_all_parameters()
49 oci->sec_channel = (((oci->channel - 1) / 4) % 2) ? -1 : 1; in ocv_derive_all_parameters()
57 u8 op_class, channel; in ocv_insert_oci() local
60 if (ieee80211_chaninfo_to_channel(ci->frequency, ci->chanwidth, in ocv_insert_oci()
61 ci->sec_channel, in ocv_insert_oci()
62 &op_class, &channel) < 0) { in ocv_insert_oci()
64 "Cannot determine operating class and channel for OCI element"); in ocv_insert_oci()
65 return -1; in ocv_insert_oci()
69 *pos++ = channel; in ocv_insert_oci()
70 *pos++ = ci->seg1_idx; in ocv_insert_oci()
122 oci.channel = oci_ie[1]; in ocv_verify_tx_params()
131 if ((int) ci->frequency != oci.freq) { in ocv_verify_tx_params()
133 "primary channel mismatch in received OCI (we use %d but receiver is using %d)", in ocv_verify_tx_params()
134 ci->frequency, oci.freq); in ocv_verify_tx_params()
142 "channel bandwidth mismatch in received OCI (we use %d but receiver only supports %d)", in ocv_verify_tx_params()
148 * Secondary channel only needs be checked for 40 MHz in the 2.4 GHz in ocv_verify_tx_params()
150 * Note that the field ci->sec_channel is only filled in when we use in ocv_verify_tx_params()
153 if (tx_chanwidth == 40 && ci->frequency < 2500 && in ocv_verify_tx_params()
154 ci->sec_channel != oci.sec_channel) { in ocv_verify_tx_params()
156 "secondary channel mismatch in received OCI (we use %d but receiver is using %d)", in ocv_verify_tx_params()
157 ci->sec_channel, oci.sec_channel); in ocv_verify_tx_params()
162 * When using an 80+80 MHz channel to transmit, verify that we use in ocv_verify_tx_params()
165 if (ci->chanwidth == CHAN_WIDTH_80P80 && in ocv_verify_tx_params()
168 "frequency segment 1 mismatch in received OCI (we use %d but receiver is using %d)", in ocv_verify_tx_params()