Whren, reasonable suspicion, and consent to search.
Maryland courts apply both the U.S. Constitution and the Maryland Constitution to traffic stops & pretext claims. When state protections are broader than federal ones, Maryland judges follow the state rule. When they are equal or narrower, federal precedent controls under the Supremacy Clause.
Federal cases governing traffic stops & pretext include controlling U.S. Supreme Court decisions and binding precedent from the federal circuit covering Maryland. Civil remedies most often proceed under 42 U.S.C. § 1983, with defenses including qualified immunity.
Legal information, not legal advice. For advice on your situation, consult a licensed attorney in Maryland.