Miller, Bears agree to $22.5 million deal